diff --git a/scripts/scripts/bg_slideshow.pid b/scripts/scripts/bg_slideshow.pid new file mode 100644 index 0000000..6cc7f91 --- /dev/null +++ b/scripts/scripts/bg_slideshow.pid @@ -0,0 +1 @@ +11599 diff --git a/scripts/scripts/hyprland-slideshow.sh b/scripts/scripts/hyprland-slideshow.sh index 4a9214d..2105caf 100755 --- a/scripts/scripts/hyprland-slideshow.sh +++ b/scripts/scripts/hyprland-slideshow.sh @@ -24,6 +24,8 @@ randomIndex=$(($RANDOM % $length)) echo ${image} } + + while true; do chooseRandom ${path} hyprctl hyprpaper preload "${image}" diff --git a/scripts/scripts/hyprland-switch-bg.sh b/scripts/scripts/hyprland-switch-bg.sh index 3d6202a..c89d2a0 100755 --- a/scripts/scripts/hyprland-switch-bg.sh +++ b/scripts/scripts/hyprland-switch-bg.sh @@ -1,5 +1,12 @@ bgsDirectory="${HOME}/bgs/" +##set working directory to location of this script +cd "$(dirname "$0")" + +##stop slideshow if running +sh ./hyprland-slideshow.sh kill + + preloadImage(){ hyprctl hyprpaper preload "${image}" }