sway: add swayidle.conf

Resolves: #132
This commit is contained in:
Aminda Suomalainen 2022-04-19 16:57:19 +03:00
parent aaec26e389
commit 7189a06a28
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 13 additions and 2 deletions

View File

@ -22,8 +22,8 @@ set $menu bemenu-run | xargs swaymsg exec --
# Screen lock command
# -c, colour, -F showing failed attempts, -k keyboard layout display,
# -l, caps lock idnicator
set $ScreenLockCmd swaylock -c 000000 -F -k -l
# -l, caps lock idnicator, -f fork (required by swayidle)
set $ScreenLockCmd swaylock -c 000000 -F -k -l -f
# Preferred graphical text editor
set $TEXTEDITOR pluma

View File

@ -0,0 +1,11 @@
# Copied from `man swayidle`, except the $ScreenLockCmd that I don't
# want to repeat.
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on
# when resumed. It will also lock your screen before your computer goes to
# sleep.
exec swayidle -w \
timeout 300 "\"$ScreenLockCmd\"" \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep "\"$ScreenLockCmd\""