aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/hypr/scripts/wallpaper.sh8
-rw-r--r--.config/lf/lfrc2
2 files changed, 8 insertions, 2 deletions
diff --git a/.config/hypr/scripts/wallpaper.sh b/.config/hypr/scripts/wallpaper.sh
index 13aae39..2c87158 100755
--- a/.config/hypr/scripts/wallpaper.sh
+++ b/.config/hypr/scripts/wallpaper.sh
@@ -1,6 +1,12 @@
#!/bin/sh
+# Read file path into variable
+read -r wallpaper<~/.cache/wallpaper
+
if pgrep swaybg; then
pkill swaybg
fi
-swaybg -m fill -i ~/.cache/wallpaper
+swaybg -m fill -i "$wallpaper"
+# hyprctl hyprpaper preload "$wallpaper"
+# hyprctl hyprpaper wallpaper " , $wallpaper"
+# hyprctl hyprpaper unload unused
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 6aa3f19..ebf11ba 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -54,7 +54,7 @@ cmd open ${{
cmd setwallpaper ${{
#cp -f "$f" ~/.cache/wallpaper; pkill swaybg > /dev/null 2>&1; nohup swaybg -m fill -i ~/.cache/wallpaper > /dev/null 2>&1 &
# cp -f "$f" ~/.cache/wallpaper && qtile cmd-obj -o cmd -f reload_config
- cp -f "$f" ~/.cache/wallpaper; sh ~/.config/hypr/scripts/wallpaper.sh > /dev/null 2>&1 &
+ echo "$f" > ~/.cache/wallpaper; sh ~/.config/hypr/scripts/wallpaper.sh > /dev/null 2>&1 &
}}
# Key Mappings