xmobar - add quodlibet info/toggle and sound icon
This commit is contained in:
parent
7bf50613a3
commit
ce22e48484
9 changed files with 134 additions and 1 deletions
8
local/bin/quodinfo
Executable file
8
local/bin/quodinfo
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(quodlibet --status | cut -d' ' -f1)
|
||||
case "$status" in
|
||||
"playing") quodlibet --print-playing "<title~album>" ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
17
local/bin/soundinfo
Executable file
17
local/bin/soundinfo
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
if grep -q "\[on\]" <(amixer get Master); then
|
||||
current="$(amixer get Master | sed -n '/%/s/.*\[\(.*\)%\].*/\1/p' | head -1)"
|
||||
if (( current <= 25 )); then
|
||||
echo "none"
|
||||
elif (( current <= 50 )); then
|
||||
echo "low"
|
||||
elif (( current <= 75 )); then
|
||||
echo "medium"
|
||||
else
|
||||
echo "high"
|
||||
fi
|
||||
else
|
||||
echo "mute"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue