Added Statusbad Commands (Not in correct location)

This commit is contained in:
2022-09-21 20:51:46 +01:00
parent 8afd56ea27
commit 990568295b
12 changed files with 125 additions and 0 deletions

23
statusbar/dwm_volume Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
vol=$(pactl list sinks | perl -000ne 'if(/#1/){/(Volume:.*)/; print "$1\n"}' | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
if [ -z "$vol" ]; then
vol=$(pactl list sinks | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
fi
vol_status=$(pactl list sinks | grep 'Mute: yes')
if [ -n "$vol_status" ]
then
vol_icon=" "
elif [ ${vol::-1} -eq 0 ]
then
vol_icon=" "
elif [ ${vol::-1} -lt 50 ]
then
vol_icon=" "
else
vol_icon=" "
fi
printf "$vol_icon^c#f7ca88^$vol%%^d^"