[sway/idle] moved to systemd

This commit is contained in:
Felix Buehler 2020-02-23 17:32:56 +01:00
parent b923666428
commit 9b00389e38
2 changed files with 16 additions and 6 deletions

View file

@ -28,12 +28,6 @@ output * bg #0C0C0D solid_color
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec nm-applet --indicator exec nm-applet --indicator
exec gnome-keyring-daemon --start --components secrets exec gnome-keyring-daemon --start --components secrets
exec swayidle \
timeout 285 'notify-send -a lockscreen -c lock-warn -u critical -t 100 -i system-lock-screen "Locking Screen" "Will Lock Screen in 15s"' \
timeout 300 '~/.dotfiles/sway/lock.sh' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '~/.dotfiles/sway/lock.sh'
exec dunst exec dunst
exec sleep 2 && QSyncthingTray exec sleep 2 && QSyncthingTray
exec telegram-desktop -startintray exec telegram-desktop -startintray

16
sway/swayidle.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=Idle manager for Wayland
Documentation=man:swayidle(1)
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/swayidle -w \
timeout 285 'notify-send -a lockscreen -c lock-warn -u critical -t 14900 -i system-lock-screen "Locking Screen" "Will Lock Screen in 15s"' \
timeout 300 '~/.dotfiles/sway/lock.sh' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '~/.dotfiles/sway/lock.sh'
[Install]
WantedBy=sway-session.target