From 47b53fd5b52a4ed754fb42e8a359e11f826991af Mon Sep 17 00:00:00 2001 From: Ryan Chan Date: Sun, 23 Oct 2022 15:59:02 +0100 Subject: [PATCH] Use swaylockd to spawn swaylock securely --- sway/config | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sway/config b/sway/config index 024ba6a..421023d 100644 --- a/sway/config +++ b/sway/config @@ -49,9 +49,10 @@ output DP-1 adaptive_sync on ### Idle configuration # exec swayidle -w \ - timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + timeout 600 'swaylockd -f -c 000000' \ + timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ before-sleep 'playerctl pause' \ - before-sleep 'swaylock -f -c 000000' + before-sleep 'swaylockd -f -c 000000' ### Input configuration # @@ -66,6 +67,14 @@ exec swayidle -w \ # # You can get the names of your inputs by running: swaymsg -t get_inputs # Read `man 5 sway-input` for more information about this section. +input "1:1:AT_Translated_Set_2_keyboard" { + xkb_layout "gb" +} + +input "1739:30383:DELL07E6:00_06CB:76AF_Touchpad" { + tap enabled + natural_scroll enabled +} ### Key bindings # @@ -108,10 +117,19 @@ exec swayidle -w \ # Find and copy otp to clipboard bindsym $mod+Shift+o exec fmenu_pass --otp + # Volume controls + bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + # Media player control bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous + + # Brightness controls + bindsym XF86MonBrightnessDown exec brightnessctl set 10%- + bindsym XF86MonBrightnessUp exec brightnessctl set 10%+ # # Moving around: # -- 2.38.4