feat: polybar and rofi

This commit is contained in:
Elias Renman
2024-02-02 15:22:58 +01:00
parent 8d5b668ac4
commit d6cde2b388
17 changed files with 820 additions and 64 deletions

23
polybar/sound.sh Normal file
View File

@@ -0,0 +1,23 @@
function main() {
# Pipewire
active_device=$(pamixer --get-default-sink | awk -F'"' '/Default sink/{next} {print $(NF-1)}')
VOLUME=$(pamixer --get-volume-human)
action=$1
if [ "${action}" == "up" ]; then
pamixer -i 5
elif [ "${action}" == "down" ]; then
pamixer -d 5
elif [ "${action}" == "mute" ]; then
pamixer -t
else
if [ "$VOLUME" == "muted" ]; then
echo "$active_device 󰝟"
else
echo "$active_device$VOLUME"
fi
fi
}
main $@