From a23e6ed658342a405544ebe055ec1ac2fd464484 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Thu, 15 Sep 2022 16:03:45 +0200 Subject: Basic wayland (swaybg) support --- smart-wallpaper | 7 +++++-- 1 file 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(){ -- cgit 1.4.1