mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-21 23:55:07 +03:00
Add lock keybind & script
This commit is contained in:
parent
4cb16aa027
commit
e8d885e280
2 changed files with 11 additions and 2 deletions
|
@ -33,7 +33,7 @@ include ~/.config/sway/themes/solarized-dark
|
||||||
|
|
||||||
exec mako
|
exec mako
|
||||||
exec poweralertd
|
exec poweralertd
|
||||||
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 60 'swaylock -f -c 073642' timeout 70 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 073642'
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ bindsym $mod+Shift+q kill
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec $menu
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
bindsym $mod+Shift+c reload
|
bindsym $mod+Shift+c reload
|
||||||
bindsym $mod+Shift+e exec swaynag -f 'Ubuntu 9' -e bottom -t warning -m "What would you like to do?" -B 'Exit sway' 'swaymsg exit' -B 'Power off' 'systemctl poweroff' -B 'Reboot' 'systemctl reboot'
|
bindsym $mod+Shift+e exec swaynag -f 'JetBrains Mono 9' -e bottom -t warning -m "What would you like to do?" -B 'Exit sway' 'swaymsg exit' -B 'Power off' 'systemctl poweroff' -B 'Reboot' 'systemctl reboot' -B 'Lock screen' '$HOME/.config/sway/lock.sh'
|
||||||
bindsym $mod+$left focus left
|
bindsym $mod+$left focus left
|
||||||
bindsym $mod+$down focus down
|
bindsym $mod+$down focus down
|
||||||
bindsym $mod+$up focus up
|
bindsym $mod+$up focus up
|
||||||
|
|
9
configs/sway/lock.sh
Executable file
9
configs/sway/lock.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Times the screen off and puts it to background
|
||||||
|
swayidle \
|
||||||
|
timeout 10 'swaymsg "output * dpms off"' \
|
||||||
|
resume 'swaymsg "output * dpms on"' &
|
||||||
|
# Locks the screen immediately
|
||||||
|
swaylock -c 073642
|
||||||
|
# Kills last background task so idle timer doesn't keep running
|
||||||
|
kill %%
|
Loading…
Reference in a new issue