Combine screen lock script for i3 and sway

This commit is contained in:
2022-06-09 19:49:07 +02:00
parent 932e0a0b14
commit 6e9e55bfd9
6 changed files with 46 additions and 64 deletions

View File

@ -32,7 +32,7 @@ exec --no-startup-id dex --autostart --environment i3
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-cool
exec --no-startup-id xss-lock --transfer-sleep-lock -- screenlock
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
@ -64,7 +64,7 @@ bindsym $mod+e exec --no-startup-id dmenu_run
# lock screen
#bindsym $mod+Shift+l exec loginctl lock-session
bindsym $mod+Shift+l exec i3lock-cool
bindsym $mod+Shift+l exec screenlock
# change focus
bindsym $mod+h focus left

View File

@ -50,9 +50,9 @@ exec mako
### Idle configuration
exec swayidle -w \
timeout 300 'swaylock-cool -fFe' \
timeout 300 'screenlock -fFe' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock-cool -fFe'
before-sleep 'screenlock -fFe'
# 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
@ -90,7 +90,7 @@ input * {
bindsym $mod+d exec $menu
# Lock the screen
bindsym $mod+Shift+Plus exec "swaylock-cool -fFe"
bindsym $mod+Shift+Plus exec "screenlock -fFe"
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB