Adds background switcher systemd files to dotfiles

This commit is contained in:
Jonathan Hodgson 2020-09-26 15:09:26 +01:00
parent 381c66d766
commit fc2ea10d47
4 changed files with 24 additions and 0 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ mutt/accounts/*
/qutebrowser/.config/qutebrowser/qsettings/
/qutebrowser/.config/qutebrowser/autoconfig.yml
/bin/.bin/pappy
/systemd/.config/systemd/user/timers.target.wants/

View file

@ -0,0 +1,8 @@
[Unit]
Description=Background Switcher
[Service]
ExecStart=/home/jonathan/.config/systemd/user/randomBackground
[Install]
WantedBy=default.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Change Wallpaper every minute
[Timer]
OnBootSec=1min
OnUnitActiveSec=1min
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
backgroundDir="$HOME/Pictures/wallpapers/"
ls "$backgroundDir" | /usr/bin/shuf -n 1 | /usr/bin/awk \
"{print \"$backgroundDir\" \$1}" | /usr/bin/xargs /usr/bin/feh --bg-fill