From 9b00389e38c63835df5225688ed88d1a8188198b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 23 Feb 2020 17:32:56 +0100 Subject: [PATCH] [sway/idle] moved to systemd --- sway/config | 6 ------ sway/swayidle.service | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 sway/swayidle.service diff --git a/sway/config b/sway/config index 9df37b8..93e421c 100644 --- a/sway/config +++ b/sway/config @@ -28,12 +28,6 @@ output * bg #0C0C0D solid_color exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec nm-applet --indicator 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 sleep 2 && QSyncthingTray exec telegram-desktop -startintray diff --git a/sway/swayidle.service b/sway/swayidle.service new file mode 100644 index 0000000..261dc75 --- /dev/null +++ b/sway/swayidle.service @@ -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 \ No newline at end of file