wallpaper: use XDG_RUNTIME_DIR

This commit is contained in:
Vincent Bernat 2021-12-07 19:51:47 +01:00
parent a53d0a3d82
commit 77c1503555
5 changed files with 6 additions and 6 deletions

View file

@ -34,7 +34,7 @@ case "$1" in
playerctl -a pause playerctl -a pause
dunstctl set-paused true dunstctl set-paused true
# Then, lock screen # Then, lock screen
i3lock -n -e -i $HOME/.cache/i3/current-wallpaper.png -t -f i3lock -n -e -i $XDG_RUNTIME_DIR/i3/current-wallpaper.png -t -f
# Alternative if we prefer videos: # Alternative if we prefer videos:
# XSECURELOCK_SAVER=saver_mpv # XSECURELOCK_SAVER=saver_mpv
# XSECURELOCK_LIST_VIDEOS_COMMAND="ls -1 ~/.config/i3/wallpapers/*.mp4" # XSECURELOCK_LIST_VIDEOS_COMMAND="ls -1 ~/.config/i3/wallpapers/*.mp4"

View file

@ -4,6 +4,6 @@ PartOf=graphical-session.target
[Service] [Service]
ExecStartPre=%h/.config/i3/bin/picom-configure ExecStartPre=%h/.config/i3/bin/picom-configure
ExecStart=%h/.local/bin/picom --config ${XDG_RUNTIME_DIR}/i3/picom.conf --experimental-backends ExecStart=%h/.local/bin/picom --config %t/i3/picom.conf --experimental-backends
ExecReload=%h/.config/i3/bin/picom-configure ExecReload=%h/.config/i3/bin/picom-configure
Restart=on-failure Restart=on-failure

View file

@ -7,7 +7,7 @@ Requisite=polybar.service
[Service] [Service]
# Get one from https://openweathermap.org/, it's free # Get one from https://openweathermap.org/, it's free
Environment=OWM_API_KEY=81687c78e0376836871a6cb9fc347249 Environment=OWM_API_KEY=81687c78e0376836871a6cb9fc347249
ExecStart=/usr/bin/mkdir -p %h/.cache/i3 ExecStart=/usr/bin/mkdir -p %t/i3
ExecStart=%h/.config/i3/bin/polybar-weather ExecStart=%h/.config/i3/bin/polybar-weather
Type=oneshot Type=oneshot
RemainAfterExit=false RemainAfterExit=false

View file

@ -4,8 +4,8 @@ PartOf=graphical-session.target
[Service] [Service]
Environment=WALLPAPER_DIRECTORY=%h/.config/i3/wallpapers Environment=WALLPAPER_DIRECTORY=%h/.config/i3/wallpapers
Environment=WALLPAPER_OUTPUT=%h/.cache/i3/current-wallpaper.png Environment=WALLPAPER_OUTPUT=%t/i3/current-wallpaper.png
ExecStart=/usr/bin/mkdir -p %h/.cache/i3 ExecStart=/usr/bin/mkdir -p %t/i3
ExecStart=%h/.config/i3/bin/wallpaper --directory $WALLPAPER_DIRECTORY \ ExecStart=%h/.config/i3/bin/wallpaper --directory $WALLPAPER_DIRECTORY \
--target $WALLPAPER_OUTPUT --target $WALLPAPER_OUTPUT
ExecStart=/usr/bin/hsetroot -root -center $WALLPAPER_OUTPUT ExecStart=/usr/bin/hsetroot -root -center $WALLPAPER_OUTPUT

View file

@ -4,4 +4,4 @@ Description=Screen dimmer
[Service] [Service]
ExecStart=%h/.config/i3/bin/xss-dimmer --delay=%i \ ExecStart=%h/.config/i3/bin/xss-dimmer --delay=%i \
--font "Monkey Island 1991" \ --font "Monkey Island 1991" \
--background=%h/.cache/i3/current-wallpaper.png --background=%t/i3/current-wallpaper.png