Add volume keys using personal volume wrapper. Message is not getting content though, unsure why.

This commit is contained in:
2026-07-16 19:02:57 -07:00
parent 862b36d537
commit d2356a5780
+30 -12
View File
@@ -36,10 +36,10 @@ exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
@@ -116,19 +116,37 @@ bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
## Brightness ##
# Use the bracket keys to change the brightness.
# light requires sudo privileges unless video group and udev are configured.
bindsym $mod+bracketleft exec "light -U 5; notify-send 'Brightness Down' $(light -G)"
bindsym $mod+bracketright exec "light -A 5; notify-send 'Brightness Up' $(light -G)"
bindsym shift+$mod+bracketleft exec "light -U 25; notify-send 'Brightness Down' $(light -G)"
bindsym shift+$mod+bracketright exec "light -A 25; notify-send 'Brightness Up' $(light -G)"
bindsym $mod+bracketleft exec --no-startup-id "light -U 5; notify-send 'Brightness Down' $(light -G)"
bindsym $mod+bracketright exec --no-startup-id "light -A 5; notify-send 'Brightness Up' $(light -G)"
bindsym shift+$mod+bracketleft exec --no-startup-id "light -U 25; notify-send 'Brightness Down' $(light -G)"
bindsym shift+$mod+bracketright exec --no-startup-id "light -A 25; notify-send 'Brightness Up' $(light -G)"
bindsym XF86MonBrightnessUp exec "light -A 5; notify-send 'Brightness Up' $(light -G)"
bindsym XF86MonBrightnessDown exec "light -U 5; notify-send 'Brightness Down' $(light -G)"
bindsym shift+XF86MonBrightnessUp exec l"ight -A 25; notify-send 'Brightness Up' $(light -G)"
bindsym shift+XF86MonBrightnessDown exec l"ight -U 25; notify-send 'Brightness Down' $(light -G)"
# Also get the actual brightness keys to work!!
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A 5; notify-send 'Brightness Up' $(light -G)"
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U 5; notify-send 'Brightness Down' $(light -G)"
bindsym shift+XF86MonBrightnessUp exec --no-startup-id "light -A 25; notify-send 'Brightness Up' $(light -G)"
bindsym shift+XF86MonBrightnessDown exec --no-startup-id "light -U 25; notify-send 'Brightness Down' $(light -G)"
## Volume ##
# The volume function is from https://git.hyperling.com/me/env-ansible
# TBD: Why is the displayed volume not showing up like `light -G` above?
# Use the comma and period keys to change volume.
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -5 && notify-send "Volume Down" $(vol-d)'
bindsym $mod+period exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume +5 && notify-send 'Volume Up' $(vol-d)"
bindsym shift+$mod+comma exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume -25 && notify-send 'Volume Down' $(vol-d)"
bindsym shift+$mod+period exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume +25 && notify-send 'Volume Up' $(vol-d)"
# Actual volume keys.
bindsym XF86AudioMute exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume mute && notify-send 'Volume Muted' $(vol-d)"
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume +5 && notify-send 'Volume Up' $(vol-d)"
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume -5 && notify-send 'Volume Down' $(vol-d)"
bindsym shift+XF86AudioRaiseVolume exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume +25 && notify-send 'Volume Up' $(vol-d)"
bindsym shift+XF86AudioLowerVolume exec --no-startup-id bash -c "source /usr/local/bin/volume.function && volume -25 && notify-send 'Volume Down' $(vol-d)"
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.