Add dotfiles

This commit is contained in:
Gluk0zka 2024-06-02 14:02:06 +03:00
parent 49bfe1a4d3
commit b6e01a720b
52 changed files with 4701 additions and 0 deletions

20
dwmbar/modules/volume Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
# Prints out the volume percentage
VOLUME_ON_ICON=''
VOLUME_MUTED_ICON=''
get_volume(){
curStatus=$(pactl get-sink-mute @DEFAULT_SINK@)
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | tail -n 2 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
if [ "${curStatus}" = 'Mute: yes' ]
then
echo "$VOLUME_MUTED_ICON $volume%"
else
echo "$VOLUME_ON_ICON $volume%"
fi
}
get_volume