Set up hotkeys to control the microphone
This commit is contained in:
parent
6584255458
commit
9ecd7e4222
2 changed files with 17 additions and 1 deletions
|
|
@ -241,6 +241,9 @@ bindsym XF86TouchpadToggle exec swaymsg input type:touchpad events toggle enable
|
|||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym Shift+XF86AudioMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym Shift+XF86AudioLowerVolume exec pactl set-source-volume @DEFAULT_SOURCE@ -5%
|
||||
bindsym Shift+XF86AudioRaiseVolume exec pactl set-source-volume @DEFAULT_SOURCE@ +5%
|
||||
|
||||
#
|
||||
# Screenshots
|
||||
|
|
|
|||
|
|
@ -64,6 +64,19 @@ elif [ "${audio_mute}" = "no" ]; then
|
|||
else
|
||||
audio_symbol="🔊"
|
||||
fi
|
||||
else
|
||||
audio_symbol="❔"
|
||||
fi
|
||||
|
||||
mike_mute=$(pactl get-source-mute @DEFAULT_SOURCE@ | awk '{print $2}')
|
||||
mike_volume=$(pactl get-source-volume @DEFAULT_SOURCE@ | grep -o '[0-9]\+%' | head -n 1 | tr -d %)
|
||||
mike_symbol="❔"
|
||||
if [ "${mike_mute}" = "yes" ]; then
|
||||
mike_symbol="🍌"
|
||||
elif [ "${mike_mute}" = "no" ]; then
|
||||
mike_symbol="🎤"
|
||||
else
|
||||
mike_symbol="❔"
|
||||
fi
|
||||
|
||||
battery=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
|
|
@ -84,4 +97,4 @@ case "${battery_state}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo "${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%"
|
||||
echo "${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${mike_symbol}${mike_volume}% ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue