dimmer: handle wide screens split in two

This commit is contained in:
Vincent Bernat 2023-04-25 11:34:53 +02:00
parent a3c2d4897e
commit 2ff8e9bacd
4 changed files with 45 additions and 10 deletions

View file

@ -4,10 +4,12 @@ PartOf=graphical-session.target
[Service]
Environment=WALLPAPER_DIRECTORY=%h/.config/i3/wallpapers
Environment=WALLPAPER_OUTPUT=%t/i3/current-wallpaper.png
Environment=WALLPAPER_TARGET=%t/i3/current-wallpaper.png
Environment=WALLPAPER_OUTPUTS=%t/i3/outputs.txt
ExecStart=/usr/bin/mkdir -p %t/i3
ExecStart=%h/.config/i3/bin/wallpaper --directory $WALLPAPER_DIRECTORY \
--target $WALLPAPER_OUTPUT
ExecStart=/usr/bin/hsetroot -root -center $WALLPAPER_OUTPUT
--target $WALLPAPER_TARGET \
--outputs $WALLPAPER_OUTPUTS
ExecStart=/usr/bin/hsetroot -root -center $WALLPAPER_TARGET
Type=oneshot
RemainAfterExit=false

View file

@ -2,7 +2,8 @@
Description=Screen dimmer
[Service]
ExecStart=%h/.config/i3/bin/xss-dimmer --delay=%i \
--background=%t/i3/current-wallpaper.png \
--sound=/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
ExecStart=%h/.config/i3/bin/xss-dimmer \
--delay=%i \
--background=%t/i3/current-wallpaper.png \
--sound=/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
TimeoutSec=1