diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-15 16:03:45 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-09-15 16:03:45 +0200 |
commit | a23e6ed658342a405544ebe055ec1ac2fd464484 (patch) | |
tree | a35a0b10f4e90bd2d1beac29b6e0e3768ae1adf2 | |
parent | Create LICENSE (diff) | |
download | smart-wallpaper-master.tar.gz smart-wallpaper-master.tar.bz2 smart-wallpaper-master.zip |
-rwxr-xr-x | smart-wallpaper | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/smart-wallpaper b/smart-wallpaper index 5748f64..4951ad6 100755 --- a/smart-wallpaper +++ b/smart-wallpaper @@ -43,11 +43,14 @@ print_usage() { } set_wallpaper() { - if [[ $procid != '' ]]; then kill $procid fi + if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then + swaybg -i $1 & + procid=$! + else killall xwinwrap killall gifview #TODO: gotta kill mpv as well (but not all instances) HELP NEEDED @@ -62,7 +65,7 @@ set_wallpaper() { nice xwinwrap -ni -fs -st -sp -nf -ov -s -r -debug -- feh --window-id WID -F --zoom fill -g $resolution $1 procid=$! fi - + fi } drawwallpaper(){ |