From 4b0e5c04eeeda8f07448ae264e7356a2f3cce191 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 4 Jan 2023 15:54:55 -0500 Subject: [PATCH 1/2] sway: Restart kanshi on reload --- sway/.config/sway/config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/.config/sway/config b/sway/.config/sway/config index c67b912..0c29b57 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -271,3 +271,7 @@ for_window [app_id="pavucontrol"] floating enable # Start the systemd-user target for sway and import environment # Makes service management a bit cleaner exec_always "systemctl --user import-environment; systemctl --user start sway-session.target" + +# Restart kanshi if it is running +# This restores monitor configuration on reload +exec_always "systemctl --user is-active kanshi && systemctl --user restart kanshi" From fcc18b48594b92456d5a9a95b4f45f41214f4080 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 4 Jan 2023 15:59:21 -0500 Subject: [PATCH 2/2] sway: Add bindings for audio volume control based on WirePlumber --- sway/.config/sway/config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 0c29b57..fe45d74 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -237,6 +237,11 @@ bindsym Shift+F10 exec grimshot --notify save screen bindsym Ctrl+Tab workspace next bindsym Ctrl+grave workspace prev +# Audio volume (WirePlumber) +bindsym --locked XF86AudioRaiseVolume exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+" +bindsym --locked XF86AudioLowerVolume exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-" +bindsym --locked XF86AudioMute exec "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + bar { swaybar_command waybar }