commit 4dddd7895d19fbb6dd4d0e1473ebd023bc0c9e91
parent 478980ee087eca7c15deafbb9c15cdda3effbd5e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 26 Sep 2019 12:56:25 +0200
Show mute status, fix typo in keybind
Diffstat:
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
@@ -107,7 +107,7 @@ XF86AudioMute
#amixer sset Master toggle; dwmstatus-refresh
XF86Audio{Lower,Raise}Volume
pulsemixer --unmute --change-volume {-3,+3}; dwmstatus-refresh
- #amixser sset Master 5%{-,+}; dwmstatus-refresh
+ #amixer sset Master 5%{-,+}; dwmstatus-refresh
XF86MonBrightness{Down,Up}
xbacklight -{dec,inc} 5
diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus
@@ -12,13 +12,17 @@ printf "%s" "$(mpc status | sed 1q | sed 's/^volume:.*$//;s/^/ /;s/$/ |/;s/ |//
printf " %s $separator" "$(setxkbmap -print | sed -n '5s/^.*pc+//;5s/+.*$//;5p')"
# audio volume
-printf " ♪ "
if type mixerctl >/dev/null 2>&1; then
+ if mixerctl outputs.master.mute | grep -q off; then
+ printf " ♪ "
+ else
+ printf " M "
+ fi
printf "%s" "$(mixerctl outputs.master | sed 's/.*=\([0-9]*\),.*/\1/')%"
elif type amixer >/dev/null 2>&1; then
- printf "%s" "$(amixer get Master | grep -o "[0-9]*%\|\[off\]")"
+ printf " ♪ %s" "$(amixer get Master | grep -o "[0-9]*%\|\[off\]")"
elif type pulsemixer >/dev/null 2>&1; then
- printf "%s" "$(pulsemixer --get-volume | cut -d' ' -f1)%"
+ printf " ♪ %s" "$(pulsemixer --get-volume | cut -d' ' -f1)%"
fi
printf " $separator"