From 58337d06abb7e5f71bf29e9c771fa2881b1a8ad5 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Fri, 9 May 2025 01:04:32 +0200 Subject: [PATCH] Add media F-row key bindings to sway, setup keybinds for audio control. Add base for updating statusbar which is not yet working. --- sway/config | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sway/config b/sway/config index 03a45d5..897d6ae 100644 --- a/sway/config +++ b/sway/config @@ -63,6 +63,8 @@ exec swayidle -w \ timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ before-sleep '$swaylock -f' +set $update_status_bar /run/current-system/sw/bin/kill -s 42 $(cat $status_pid_file) + ### Key bindings # Start a terminal bindsym $mod+Return exec $term @@ -70,6 +72,29 @@ exec swayidle -w \ # Open browser bindsym $mod+b exec firefox + # Open audio control + bindsym $mod+a exec pavucontrol --tab 1 + + # Brightness control + bindsym XF86MonBrightnessDown exec brightnessctl set 5%- ; $update_status_bar + bindsym XF86MonBrightnessUp exec brightnessctl set +5% ; $update_status_bar + + # Launch + bindsym XF86LaunchA exec $menu + + # Search + bindsym XF86Search exec $menu + + # bindsym XF86AudioRecord + # XF86AudioPrev + # XF86AudioPlay + # XF86AudioNext + + # Volume control + bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- ; $update_status_bar + bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ ; $update_status_bar + bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ; $update_status_bar + # Kill focused window bindsym $mod+q kill