From 8be3d10f4e26b449fcacbaad9bb7b6db1cd08f81 Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:57:52 +0200 Subject: [PATCH] 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. --- .config/hypr/hyprland.conf | 2 +- .local/bin/sw | 9 ++++----- .scripts/toggle-weeb-mode.sh | 7 +++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ed9ad77..9a604b9 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -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 } diff --git a/.local/bin/sw b/.local/bin/sw index 0d45fac..b2b5175 100755 --- a/.local/bin/sw +++ b/.local/bin/sw @@ -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 diff --git a/.scripts/toggle-weeb-mode.sh b/.scripts/toggle-weeb-mode.sh index 611e613..ac15afb 100755 --- a/.scripts/toggle-weeb-mode.sh +++ b/.scripts/toggle-weeb-mode.sh @@ -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