22 lines
940 B
Text
22 lines
940 B
Text
![]() |
# Key bindings to control pipewire or pulseaudio volume with pactl.
|
||
|
# Displays a notification with the current state if /usr/bin/notify-send is available
|
||
|
#
|
||
|
# Volume increase/decrease step can be customized by setting the `$volume_step`
|
||
|
# variable to a numeric value before including the file.
|
||
|
# Maximum volume boost level can be set with the `$volume_limit` variable.
|
||
|
#
|
||
|
# Requires: pulseaudio-utils
|
||
|
# Recommends: libnotify
|
||
|
|
||
|
set $volume_helper_cmd /usr/libexec/sway/volume-helper
|
||
|
|
||
|
# Allow volume controls even if the screen is locked
|
||
|
bindsym --locked {
|
||
|
XF86AudioRaiseVolume exec \
|
||
|
$volume_helper_cmd --limit "$volume_limit" --increase "$volume_step"
|
||
|
XF86AudioLowerVolume exec \
|
||
|
$volume_helper_cmd --limit "$volume_limit" --decrease "$volume_step"
|
||
|
XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && $volume_helper_cmd
|
||
|
XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||
|
}
|