diff --git a/.gitignore b/.gitignore index 4d8f0dc8..c30815b6 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/systemd/.config/systemd/user/background.service b/systemd/.config/systemd/user/background.service new file mode 100644 index 00000000..23c637c1 --- /dev/null +++ b/systemd/.config/systemd/user/background.service @@ -0,0 +1,8 @@ +[Unit] +Description=Background Switcher + +[Service] +ExecStart=/home/jonathan/.config/systemd/user/randomBackground + +[Install] +WantedBy=default.target diff --git a/systemd/.config/systemd/user/background.timer b/systemd/.config/systemd/user/background.timer new file mode 100644 index 00000000..09301755 --- /dev/null +++ b/systemd/.config/systemd/user/background.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Change Wallpaper every minute + +[Timer] +OnBootSec=1min +OnUnitActiveSec=1min + +[Install] +WantedBy=timers.target diff --git a/systemd/.config/systemd/user/randomBackground b/systemd/.config/systemd/user/randomBackground new file mode 100755 index 00000000..9115ccf1 --- /dev/null +++ b/systemd/.config/systemd/user/randomBackground @@ -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