Configure screen lock in sway
This commit is contained in:
parent
896c15bcd1
commit
c31958d021
1 changed files with 14 additions and 7 deletions
|
|
@ -36,13 +36,12 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
|||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock -f -c 000000' \
|
||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'swaylock -f -c 000000'
|
||||
|
||||
# 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.
|
||||
|
|
@ -91,6 +90,14 @@ input type:touchpad {
|
|||
# Reload the configuration file
|
||||
bindsym $wm_mod+r reload
|
||||
|
||||
# Lock screen
|
||||
# Black
|
||||
bindsym $wm_mod+l exec swaylock -f -c 000000
|
||||
# Random color
|
||||
bindsym $wm_mod+Shift+l exec swaylock -f -c $(printf "%02x%02x%02x" $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
|
||||
# Transparent
|
||||
bindsym $wm_mod+semicolon exec swaylock -f -c 00000000
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $wm_mod+Delete exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
bindsym Alt+Ctrl+Delete exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue