about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYour Name <[email protected]>2021-11-20 23:30:50 +0000
committerYour Name <[email protected]>2021-11-20 23:31:05 +0000
commitf181a17466dfd4faa51f091008e7fe4821d10b5b (patch)
tree5a10ba80da8214a5325d9ef5a55f2858026e515d
parentDont animate with display (diff)
downloadsmart-wallpaper-f181a17466dfd4faa51f091008e7fe4821d10b5b.tar.gz
smart-wallpaper-f181a17466dfd4faa51f091008e7fe4821d10b5b.tar.bz2
smart-wallpaper-f181a17466dfd4faa51f091008e7fe4821d10b5b.zip
Use feh instead of imagemagick
-rw-r--r--README.md2
-rwxr-xr-xsmart-wallpaper5
2 files changed, 3 insertions, 4 deletions
diff --git a/README.md b/README.md
index 5e2eb0a..b5cd1d5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ You can either clone the repository and run the script or if you are running Arc
 ### Dependencies
 
 Required: redshift - determining if its day/night in your location.
-          imagemagick - setting the wallpaper.
+          feh - setting the wallpaper.
           xwinwrap - drawing on top of the Xorg root
           bash
 
diff --git a/smart-wallpaper b/smart-wallpaper
index 00629a4..c833f20 100755
--- a/smart-wallpaper
+++ b/smart-wallpaper
@@ -27,7 +27,6 @@ cleanup() {
     kill $procid
   fi
   killall gifview #TODO: gotta kill mpv as well (but not all instances) HELP NEEDED
-  killall display
   xsetroot -solid black
 }
 
@@ -49,7 +48,7 @@ set_wallpaper() {
     kill $procid
   fi
 
-  killall display
+  killall xwinwrap
   killall gifview #TODO: gotta kill mpv as well (but not all instances) HELP NEEDED
 
     if [ -f /usr/bin/gifview ] && [[ $1 == *".gif" ]]; then
@@ -60,7 +59,7 @@ set_wallpaper() {
       nice xwinwrap -ni -ov -ni -s -nf -un -argb -g $resolution -- nice mpv --fullscreen --on-all-workspaces --no-config --no-input-default-bindings --no-stop-screensaver --loop-file --no-audio --no-osc --no-osd-bar -wid WID --quiet $1 &
       procid=$!
     else
-      nice xwinwrap -fs -st -sp -nf -ov -s -r -debug -- nice sh -c 'display -flatten -window $0 -resize '$resolution' '$1';sleep infinity' WID &
+      nice xwinwrap -ni -fs -st -sp -nf -ov -s -r -debug -- feh --window-id WID -F --zoom fill -g $resolution $1
       procid=$!
     fi