Added a mute-unmute script and binding to alt+mute key

This commit is contained in:
Jeremiah Ticket 2022-11-24 08:39:12 -07:00
parent ebaa989d7e
commit 5d719984eb
2 changed files with 9 additions and 0 deletions

1
i38.sh
View File

@ -250,6 +250,7 @@ bindsym Mod1+Control+Delete exec --no-startup-id sgtk-bar
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
bindsym Mod1+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% bindsym Mod1+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym Mod1+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% bindsym Mod1+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
bindsym Mod1+XF86AudioMute exec --no-startup-id ${i3Path}/scripts/mute-unmute.sh
# Music player controls # Music player controls
# Requires playerctl. # Requires playerctl.

8
scripts/mute-unmute.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ $(pamixer --get-mute) = false ]; then
spd-say -Cw 'muting'
pamixer -t
else
pamixer -t
spd-say -Cw 'unmuted'
fi