scripts
This commit is contained in:
commit
6e5095f3cf
35 changed files with 453 additions and 0 deletions
28
dwm/volume.sh
Executable file
28
dwm/volume.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) /home/swebb/Scripts/dwm/volumeMenu.sh;;
|
||||
3) /home/swebb/Scripts/dwm/uvolume.sh toggle;;
|
||||
esac
|
||||
|
||||
mute=$(amixer get Master | sed -n 5p | sed -E 's/.*\[//;s/\]//')
|
||||
volume=$(amixer get Master | sed -n 5p | sed -E 's/[^\[]*\[//;s/\].*//')
|
||||
head=$(amixer | grep -m 1 'Front Right:' | sed -E 's/.+\[/[/')
|
||||
icon=""
|
||||
case $mute in
|
||||
|
||||
on)
|
||||
mute="^c#bbbbbb^"
|
||||
if [ $head == "[off]" ]; then
|
||||
icon=""
|
||||
fi
|
||||
;;
|
||||
off)
|
||||
mute="^c#F75341^"
|
||||
if [ $head == "[off]" ]; then
|
||||
icon=""
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${mute}${icon} ${volume}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue