xmobar - restructure and clean sound/music
This commit is contained in:
parent
c0c460f006
commit
286d5cb0ec
91 changed files with 64 additions and 17 deletions
19
config/xmobar/scripts/sound
Executable file
19
config/xmobar/scripts/sound
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
sound="mute"
|
||||
|
||||
if grep -q "\[on\]" <(amixer get Master); then
|
||||
current="$(amixer get Master | sed -n '/%/s/.*\[\(.*\)%\].*/\1/p' | head -1)"
|
||||
if (( current <= 25 )); then
|
||||
sound="none"
|
||||
elif (( current <= 50 )); then
|
||||
sound="low"
|
||||
elif (( current <= 75 )); then
|
||||
sound="medium"
|
||||
else
|
||||
sound="high"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "<icon=sound/$sound.xpm/>"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue