dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 9e0e17b149b4ab12834b198bb3c10aa288f1a980
parent 4dddd7895d19fbb6dd4d0e1473ebd023bc0c9e91
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 26 Sep 2019 13:00:55 +0200

Simplify mixerctl commands

Diffstat:
M.local/bin/sysstatus | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus @@ -13,12 +13,12 @@ printf " %s $separator" "$(setxkbmap -print | sed -n '5s/^.*pc+//;5s/+.*$//;5p') # audio volume if type mixerctl >/dev/null 2>&1; then - if mixerctl outputs.master.mute | grep -q off; then + if [ "$(mixerctl -n outputs.master.mute)" = "off" ]; then printf " ♪ " else printf " M " fi - printf "%s" "$(mixerctl outputs.master | sed 's/.*=\([0-9]*\),.*/\1/')%" + printf "%s" "$(mixerctl -n outputs.master | sed 's/,.*//')%" elif type amixer >/dev/null 2>&1; then printf " ♪ %s" "$(amixer get Master | grep -o "[0-9]*%\|\[off\]")" elif type pulsemixer >/dev/null 2>&1; then