diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-11-25 18:57:40 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-25 18:57:40 +0900 |
| commit | 823ce273e69e716be814473430d0cfa5cb714b7d (patch) | |
| tree | 70878cbe3027d9da452658a8644e33d83c1b3ea2 /config/hypr/scripts/Wallpaper.sh | |
| parent | fbf04572b4ed8867da3c96551b25261401364be0 (diff) | |
| parent | 19f025c2dc27da54127ae302482398be61b55ebe (diff) | |
Merge pull request #34 from JaKooLit/v2.1.9
V2.1.9
Diffstat (limited to 'config/hypr/scripts/Wallpaper.sh')
| -rwxr-xr-x | config/hypr/scripts/Wallpaper.sh | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/config/hypr/scripts/Wallpaper.sh b/config/hypr/scripts/Wallpaper.sh index 20c367cc..d5ea4645 100755 --- a/config/hypr/scripts/Wallpaper.sh +++ b/config/hypr/scripts/Wallpaper.sh @@ -4,48 +4,8 @@ DIR=$HOME/Pictures/wallpapers/ PICS=($(find ${DIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \))) RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} -change_swaybg(){ - pkill swww - pkill swaybg - swaybg -m fill -i ${RANDOMPICS} -} - -change_swww(){ - pkill swaybg - swww query || swww init - swww img ${RANDOMPICS} --transition-fps 30 --transition-type any --transition-duration 3 -} - -change_current(){ - if pidof swaybg >/dev/null; then - change_swaybg - else - change_swww - fi -} - -switch(){ - if pidof swaybg >/dev/null; then - change_swww - else - change_swaybg - fi -} - -case "$1" in - "swaybg") - change_swaybg - ;; - "swww") - change_swww - ;; - "s") - switch - ;; - *) - change_current - ;; -esac +swww query || swww init +swww img ${RANDOMPICS} --transition-fps 30 --transition-type any --transition-duration 3 exec $HOME/.config/hypr/scripts/PywalSwww.sh & sleep 1 |
