executable_swap.sh

 1#!/usr/bin/env bash
 2
 3sed -i 's/light/dark/g' ~/.config/chezmoi/chezmoi.toml
 4chezmoi apply
 5xfconf-query -c xsettings -p /Net/ThemeName -s "Catppuccin-Macchiato-Standard-Rosewater-Dark"
 6xrdb -load ~/.Xresources
 7"$XDG_CONFIG_HOME/emacs/bin/doom" sync
 8pkill dunst
 9pkill emacs
10
11if [[ -n $WAYLAND_DISPLAY ]]; then
12    pkill waybar
13    hyprctl -i 0 dispatch exec -- waybar
14    hyprctl -i 0 dispatch exec -- dunst
15    hyprctl -i 0 dispatch exec -- emacs --daemon
16else
17    pkill polybar
18    i3-msg exec "polybar top"
19    i3-msg exec "polybar bottom"
20    i3-msg exec "dunst"
21    i3-msg exec "emacs --daemon"
22fi
23
24unlink ~/.wallpaper.png
25ln -s ~/Pictures/walls/catppuccin-macchiato.png ~/.wallpaper.png
26feh --bg-scale ~/.wallpaper.png
27notify-send "Theme switch complete"