diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2012-09-04 16:15:32 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2012-09-04 16:15:32 +0200 |
commit | 9fea28480afc529456b959c50a1ee630520905b9 (patch) | |
tree | fdbb13404084fa921864f4a894b916bfbca380f5 /bin | |
parent | 130dfa760b27a1cfce48f849a01b1f38306bea03 (diff) | |
download | dzen2-config-9fea28480afc529456b959c50a1ee630520905b9.tar.gz dzen2-config-9fea28480afc529456b959c50a1ee630520905b9.tar.xz dzen2-config-9fea28480afc529456b959c50a1ee630520905b9.zip |
bin/sound.sh: remove bashism
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sound.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/sound.sh b/bin/sound.sh index 382c461..5153375 100644 --- a/bin/sound.sh +++ b/bin/sound.sh @@ -1,11 +1,11 @@ -function print_mute { +print_mute() { local stat VOL MUTE - stat=$(amixer -c0 get Master | grep "Front Left:") - VOL=$(sed 's/^.*\[\(.*\)%\].*$/\1/g' <<< "${stat}") - MUTE=$(sed 's/^.*\[\([^\[]*\)\]$/\1/g' <<< "${stat}") + stat=$(amixer -c0 get Master | grep "\(Mono\|Front Left\):") + VOL=$(echo "${stat}" | sed 's/^.*\[\(.*\)%\].*$/\1/g') + MUTE=$(echo "${stat}" | sed 's/^.*\[\([^\[]*\)\]$/\1/g') - if [ "${MUTE}" == "off" -o "${MUTE}" == "0" ] + if [ "${MUTE}" = "off" -o "${MUTE}" = "0" ] then echo "^tw()^fg(#FF0000)^i(${HOME}/.dzen2/icons/vol-mute.xbm)" else |