summaryrefslogtreecommitdiff
path: root/bin/i3-startup-always
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-12-22 14:37:17 +0000
committerSean Whitton <spwhitton@spwhitton.name>2018-12-22 14:37:53 +0000
commit6b4bb15fe6c39198d599c3c216b54e4cc12865f0 (patch)
tree3afd1f45e0a5af8b04a2bd0ea1b368c3490665ab /bin/i3-startup-always
parent467e960d016dd512edd4512ae5a9479ac99ba8ce (diff)
downloaddotfiles-6b4bb15fe6c39198d599c3c216b54e4cc12865f0.tar.gz
prevent the wallpaper from rotating at each boot
Diffstat (limited to 'bin/i3-startup-always')
-rwxr-xr-xbin/i3-startup-always13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/i3-startup-always b/bin/i3-startup-always
index b0abdbf3..80057cbb 100755
--- a/bin/i3-startup-always
+++ b/bin/i3-startup-always
@@ -28,6 +28,19 @@ if xset -q | grep "Caps Lock: *on" >/dev/null; then
xdotool key Caps_Lock
fi
+# ---- wallpaper rotation
+
+if [ -e "$HOME/local/wallpaper.png" ] \
+ && ! systemctl --user --quiet is-enabled i3-rotate-wallpaper.timer; then
+ # Persistent=true only works if the timer has been triggered at
+ # least once, but my computer is generally suspended at midnight.
+ # So pretend that the job just fired
+ mkdir -p "$HOME/.local/share/systemd/timers"
+ touch "$HOME/.local/share/systemd/timers/stamp-i3-rotate-wallpaper.timer"
+
+ systemctl --user --now enable i3-rotate-wallpaper.timer
+fi
+
# ---- monitor settings
# if this machine is always plugged into the same monitor, may