Moves and tweaks some systemd timers / services
This commit is contained in:
parent
00ecd6bdc3
commit
b00d95d514
12 changed files with 44 additions and 8 deletions
21
systemd/HOME/.config/systemd/user/randomBackground
Executable file
21
systemd/HOME/.config/systemd/user/randomBackground
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
backgroundDir="$HOME/Pictures/wallpapers/"
|
||||
background="$(ls "$backgroundDir" | /usr/bin/shuf -n 1 | /usr/bin/awk \
|
||||
"{print \"$backgroundDir\" \$1}")"
|
||||
|
||||
echo "Wayland Display: $WAYLAND_DISPLAY"
|
||||
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
while :; do
|
||||
background="$(ls "$backgroundDir" | /usr/bin/shuf -n 1 | /usr/bin/awk \
|
||||
"{print \"$backgroundDir\" \$1}")"
|
||||
echo "I get here"
|
||||
pkill swaybg
|
||||
swaybg --mode fill -i "$background"
|
||||
sleep 60
|
||||
done
|
||||
else
|
||||
/usr/bin/feh --bg-fill "$background"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue