Update weeb-mode

Hyprland 0.31 added "force_default_wallpaper = 0".
We no longer need to set the default wallpaper using swaybg,
so now when weeb mode is turned of it just kills swaybg to show Hyprland
wallpaper.
This commit is contained in:
Viyurz 2023-10-23 13:57:52 +02:00
parent 0e384dc940
commit 8be3d10f4e
No known key found for this signature in database
3 changed files with 8 additions and 10 deletions

View file

@ -142,5 +142,5 @@ misc {
disable_autoreload = true
mouse_move_enables_dpms = true
key_press_enables_dpms = true
disable_hyprland_logo = true
force_default_wallpaper = 0
}

View file

@ -153,12 +153,11 @@ pastel color "${colors[accent2]}"
# Set wallpaper using swaybg
if grep 0 "$HOME/.cache/weeb-mode"; then
wallpaper="/usr/share/hyprland/wall_2K.png"
if grep 1 "$HOME/.cache/weeb-mode"; then
echo "Setting wallpaper using swaybg."
pkill -u "$USER" swaybg &> /dev/null
hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null
fi
echo "Setting wallpaper using swaybg."
killall -9 swaybg &> /dev/null
hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null

View file

@ -2,12 +2,11 @@
source "$HOME/.cache/wal/colors.sh"
pkill -u "$USER" swaybg
if grep -q 1 "$HOME/.cache/weeb-mode"; then
wallpaper='/usr/share/hyprland/wall_2K.png'
echo 0 > "$HOME/.cache/weeb-mode"
else
echo 1 > "$HOME/.cache/weeb-mode"
hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null
fi
killall -9 swaybg
hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null