[Linux] Update wallpaper service
This commit is contained in:
parent
e597cbc013
commit
cfbb2e6602
@ -1,10 +1,8 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=wallpaper
|
Description=wallpaper
|
||||||
Requires=compton.service
|
|
||||||
After=compton.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/env wallpaper.sh
|
ExecStart=/usr/bin/env wallpaper.sh
|
||||||
ExecStop=/usr/bin/pkill wallpaper.sh
|
ExecStop=/usr/bin/pkill wallpaper.sh
|
||||||
|
|
||||||
|
@ -1,16 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
WALLPAPER_DIR="$HOME/Pictures/wallpaper/"
|
|
||||||
|
|
||||||
random_paper() {
|
|
||||||
find "$WALLPAPER_DIR"use -type l | shuf -n1
|
|
||||||
}
|
|
||||||
|
|
||||||
wallpaper() {
|
|
||||||
while true; do
|
|
||||||
feh --bg-center $(random_paper) --bg-scale "$WALLPAPER_DIR"transparent1x1.png
|
|
||||||
sleep 10m
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
wallpaper
|
wallpaper
|
||||||
|
15
dotfiles/lib/shellenv/wallpaper.sh
Normal file
15
dotfiles/lib/shellenv/wallpaper.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
WALLPAPER_DIR="$HOME/Pictures/wallpaper/"
|
||||||
|
|
||||||
|
random_paper() {
|
||||||
|
find "$WALLPAPER_DIR"use -type l | shuf -n1
|
||||||
|
}
|
||||||
|
|
||||||
|
wallpaper() {
|
||||||
|
feh --bg-center $(random_paper) --bg-scale "$WALLPAPER_DIR"transparent1x1.png
|
||||||
|
}
|
||||||
|
|
||||||
|
wallpaper_timer() {
|
||||||
|
while true; do
|
||||||
|
sleep 10m
|
||||||
|
done
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user