aboutsummaryrefslogtreecommitdiffstats
path: root/bin/swayidle.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/swayidle.sh')
-rwxr-xr-xbin/swayidle.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/swayidle.sh b/bin/swayidle.sh
new file mode 100755
index 0000000..8b971f7
--- /dev/null
+++ b/bin/swayidle.sh
@@ -0,0 +1,6 @@
+exec swayidle -w \
+ timeout 300 "notify-send 'Power' 'System will suspend soon due to inactivity'" \
+ timeout 310 "swaylock" \
+ timeout 315 "systemctl suspend" \
+ before-sleep "swaylock"
+