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
8
systemd/HOME/.config/systemd/user/background.service
Normal file
8
systemd/HOME/.config/systemd/user/background.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Background Switcher
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/jonathan/.config/systemd/user/randomBackground
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
10
systemd/HOME/.config/systemd/user/background.timer
Normal file
10
systemd/HOME/.config/systemd/user/background.timer
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Change Wallpaper every minute
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnActiveSec=1min
|
||||
OnUnitActiveSec=1min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
9
systemd/HOME/.config/systemd/user/checkStock
Executable file
9
systemd/HOME/.config/systemd/user/checkStock
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
url="https://pine64.com/product/pinecil-smart-mini-portable-soldering-iron/"
|
||||
string="out of stock"
|
||||
|
||||
curl -sL "$url" | hq h1 text | grep -vqi "$string"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
notify-send "Pinecil back in stock"
|
||||
fi
|
3
systemd/HOME/.config/systemd/user/lookAway
Executable file
3
systemd/HOME/.config/systemd/user/lookAway
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
notify-send "Look Away"
|
8
systemd/HOME/.config/systemd/user/lookAway.service
Normal file
8
systemd/HOME/.config/systemd/user/lookAway.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Look Away
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/jonathan/.config/systemd/user/lookAway
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
9
systemd/HOME/.config/systemd/user/lookAway.timer
Normal file
9
systemd/HOME/.config/systemd/user/lookAway.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Remind me to look away every 15 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=15min
|
||||
OnUnitActiveSec=15min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
9
systemd/HOME/.config/systemd/user/monitorModem.service
Normal file
9
systemd/HOME/.config/systemd/user/monitorModem.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Monitor Modem
|
||||
|
||||
[Service]
|
||||
Environment="PATH=/usr/bin:/usr/local/bin:/home/jonathan/.bin:/home/jonathan/.bin/modem:/home/jonathan/.bin/dmenu"
|
||||
ExecStart=/home/jonathan/.bin/modem/monitorModem
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
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
|
||||
|
8
systemd/HOME/.config/systemd/user/stock.service
Normal file
8
systemd/HOME/.config/systemd/user/stock.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Check stock
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/jonathan/.config/systemd/user/checkStock
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
9
systemd/HOME/.config/systemd/user/stock.timer
Normal file
9
systemd/HOME/.config/systemd/user/stock.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Check stock every hour
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1h
|
||||
OnUnitActiveSec=1h
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Add table
Add a link
Reference in a new issue