You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
940 B
Plaintext

# 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
}