diff --git a/dot_local/share/dark-mode.d/executable_swap.sh b/dot_local/share/dark-mode.d/executable_swap.sh index 4b6f1e2ae3fdbfd3e691ad17356da9489341ec5e..627dc80e856c9e4862191a342d088b7607f97060 100644 --- a/dot_local/share/dark-mode.d/executable_swap.sh +++ b/dot_local/share/dark-mode.d/executable_swap.sh @@ -8,13 +8,11 @@ xrdb -load ~/.Xresources pkill dunst pkill emacs -matched=$(hyprctl instances | grep -oE "instance [a-zA-Z0-9]{40}_[a-zA-Z0-9]{10}:") - -if [[ -n $matched ]]; then +if [[ -n $WAYLAND_DISPLAY ]]; then pkill waybar - hyprctl dispatch exec -- waybar - hyprctl dispatch exec -- dunst - hyprctl dispatch exec -- emacs --daemon + hyprctl -i 0 dispatch exec -- waybar + hyprctl -i 0 dispatch exec -- dunst + hyprctl -i 0 dispatch exec -- emacs --daemon else pkill polybar i3-msg exec "polybar top" diff --git a/dot_local/share/light-mode.d/executable_swap.sh b/dot_local/share/light-mode.d/executable_swap.sh index 947e41992e4a141fa05608003dfc64fe79fc185b..6bd7672d891f7d1ab1fafa79fef3bc354490161e 100644 --- a/dot_local/share/light-mode.d/executable_swap.sh +++ b/dot_local/share/light-mode.d/executable_swap.sh @@ -6,11 +6,9 @@ xfconf-query -c xsettings -p /Net/ThemeName -s "Catppuccin-Latte-Standard-Rosewa xrdb -load ~/.Xresources "$XDG_CONFIG_HOME/emacs/bin/doom" sync -matched=$(hyprctl instances | grep -oE "instance [a-zA-Z0-9]{40}_[a-zA-Z0-9]{10}:") - pkill dunst pkill emacs -if [[ -n $matched ]]; then +if [[ -n $WAYLAND_DISPLAY ]]; then pkill waybar hyprctl dispatch exec -- waybar hyprctl dispatch exec -- dunst