First commit
This commit is contained in:
commit
f3627119b8
7 changed files with 152 additions and 0 deletions
21
sxhkdrc.volup
Normal file
21
sxhkdrc.volup
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
if [ -f $HOME/.config/sxhkd/sxhkdrc.conf ] ; then
|
||||
. $HOME/.config/sxhkd/sxhkdrc.conf
|
||||
fi
|
||||
vol_incr="${vol_incr:-0.025}"
|
||||
vol_delay="${vol_delay:-1}"
|
||||
vol_color="${vol_color:-cyan}"
|
||||
vol_font="${vol_font:--adobe-*-*-r-*-*-36-*-*-*-*-*-*-*}"
|
||||
|
||||
if [ -f /tmp/osd_cat.pid ] ; then
|
||||
pid=$(cat /tmp/osd_cat.pid) &&
|
||||
rm -f /tmp/osd_cat.pid
|
||||
fi
|
||||
|
||||
newvol=$(echo "$(mixer -o "vol.volume=+${vol_incr}" | grep "vol.volume=" | cut -f 2 -d = | cut -f 2 -d :)*100" | bc -l | cut -f 1 -d .)
|
||||
osd_cat -d $vol_delay -p bottom -A center -c $vol_color -s 3 -f "${vol_font}" -T Volume -b percentage -P $newvol &
|
||||
echo $! > /tmp/osd_cat.pid
|
||||
sleep 0.05
|
||||
if [ "$pid" ] && ps $pid | grep -q osd_cat ; then
|
||||
kill $pid 2>/dev/null
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue