From 88de7209d67eb9846266022a2ad71e0825589595 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Sun, 11 Jun 2023 14:29:43 +0800 Subject: [PATCH 1/1] Use swaylock. --- sway/.config/sway/config | 7 +++++++ sway/.config/sway/config.d/special_keys | 10 ++++++++++ sway/.config/sway/scripts/gnome-keyring.sh | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 sway/.config/sway/config.d/special_keys create mode 100755 sway/.config/sway/scripts/gnome-keyring.sh diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 5c55f52..90de322 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -220,4 +220,11 @@ bar { font pango:DejaVu Sans Mono 10 } +# Use swaylock via swayidle - lock screen after 5 minutes of inactivity +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' + include /etc/sway/config.d/* diff --git a/sway/.config/sway/config.d/special_keys b/sway/.config/sway/config.d/special_keys new file mode 100644 index 0000000..46ea061 --- /dev/null +++ b/sway/.config/sway/config.d/special_keys @@ -0,0 +1,10 @@ +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym pactl set-sink-mute `pactl list sinks short | grep RUNNING | awk '{print $1}'` toggle +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- +bindsym XF86MonBrightnessUp exec brightnessctl set +5% +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + diff --git a/sway/.config/sway/scripts/gnome-keyring.sh b/sway/.config/sway/scripts/gnome-keyring.sh new file mode 100755 index 0000000..ac6b0a8 --- /dev/null +++ b/sway/.config/sway/scripts/gnome-keyring.sh @@ -0,0 +1,2 @@ +eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh) +export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK -- 2.39.5