I've been working on some scripts for my slideshow because I have an image dump and I'd like to throw away wallpapers that suck. I also like the option I have on Windows 10 of being able to right-click the desktop and just skip to the next image. This is good if it randomly picks the same images in short order without giving the rest a fair shake.
So I have one script called `wp-sucks` and another called `wp-next`. (Please use these if you want them)
Code: Select all
#!/bin/bash
# wp-sucks
WP=$(gsettings get org.cinnamon.desktop.background picture-uri | tr -d \')
rm ${WP/file:\/\//}
wp-next
Code: Select all
#!/bin/bash
#wp-next
WPPATH=$(
gsettings get org.cinnamon.desktop.background.slideshow image-source \
| tr -d \'
)
WPPATH=${WPPATH/directory:\/\//}
WP=$( shuf -n 1 <(command ls -1 $WPPATH) )
gsettings set org.cinnamon.desktop.background picture-uri file://$WPPATH/$WP
gsettings set org.cinnamon.desktop.background.slideshow slideshow-enabled true
My question is, is there a better way of asking the slideshow to advance now? Can I poke whatever internal timer is running to get it to trigger immediately?