Adds background switcher systemd files to dotfiles

Jonathan Hodgson 4 years ago
parent 27cde2b004
commit 90babbaf5b
  1. 1
      .gitignore
  2. 8
      systemd/.config/systemd/user/background.service
  3. 9
      systemd/.config/systemd/user/background.timer
  4. 6
      systemd/.config/systemd/user/randomBackground

1
.gitignore vendored

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

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

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

@ -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
Loading…
Cancel
Save