xmonad/show_volume.sh

10 lines
289 B
Bash
Executable File

#!/bin/bash
function get_volume()
{
v=$(amixer get Master | egrep -o '[0-9]{1,3}%')
echo ${v%%\%*}
}
killall osd_cat
FONT="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
osd_cat -b percentage -P $(get_volume) -A center -p middle -c '#009BF9' --font=$FONT --text "volume" --delay 1