diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-03-22 17:51:44 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-03-22 17:51:44 +0100 |
| commit | d3fe12617fbbf8c452f16d03672726a9a403297b (patch) | |
| tree | 3a107ee9c67bdba296e86c3c83447d7bb5dbe72c | |
| parent | f302e1a91e0447fb646575cd019b3900c0f9cd91 (diff) | |
Fix theming wallpaper persistence
| -rw-r--r-- | roles/hyprland/templates/hypr/autostart.conf.j2 | 2 | ||||
| -rwxr-xr-x | roles/hyprtheme/files/scripts/wallpaper.sh | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/roles/hyprland/templates/hypr/autostart.conf.j2 b/roles/hyprland/templates/hypr/autostart.conf.j2 index 36ecf73c..ec06c627 100644 --- a/roles/hyprland/templates/hypr/autostart.conf.j2 +++ b/roles/hyprland/templates/hypr/autostart.conf.j2 @@ -3,6 +3,6 @@ exec-once = uwsm-app -- hypridle exec-once = uwsm-app -- mako exec-once = uwsm-app -- waybar -exec-once = uwsm-app -- swaybg -i ~/.config/hyprtheme/current/background -m fill +exec-once = uwsm-app -- swaybg -i ~/.config/hyprtheme/current/wallpaper -m fill exec-once = uwsm-app -- clipse -listen exec-once = uwsm app -- hyprsunset diff --git a/roles/hyprtheme/files/scripts/wallpaper.sh b/roles/hyprtheme/files/scripts/wallpaper.sh index 35654b94..4a1f61b2 100755 --- a/roles/hyprtheme/files/scripts/wallpaper.sh +++ b/roles/hyprtheme/files/scripts/wallpaper.sh @@ -25,6 +25,8 @@ show_wallpapers() { } select_wallpaper() { + local wallpaper_link="$HOME/.config/hyprtheme/current/wallpaper" + local selected_wallpaper="$1" if [[ ! -f "$selected_wallpaper" ]]; then notify-send -e \ @@ -37,8 +39,9 @@ select_wallpaper() { exit 0 fi + ln -nsf "$selected_wallpaper" "$wallpaper_link" pkill -x swaybg - setsid uwsm-app -- swaybg -i "$selected_wallpaper" -m fill >/dev/null 2>&1 & + setsid uwsm-app -- swaybg -i "$wallpaper_link" -m fill >/dev/null 2>&1 & } if [[ -z "$1" ]]; then |
