Add audio output controls to polybar
This commit is contained in:
parent
4fce81eff6
commit
bd6fe43b4a
4 changed files with 24 additions and 5 deletions
11
home/vylpes/.scripts/audio/get-sink-name.sh
Normal file
11
home/vylpes/.scripts/audio/get-sink-name.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
SINK=$(pactl get-default-sink)
|
||||
|
||||
if [ $SINK = "alsa_output.pci-0000_1f_00.3.analog-stereo" ]; then
|
||||
echo "Speakers"
|
||||
elif [ $SINK = "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" ]; then
|
||||
echo "Headphones"
|
||||
else
|
||||
echo "-"
|
||||
fi
|
|
@ -1,4 +0,0 @@
|
|||
if [ -d /sys/class/power_supply/BAT0 ]
|
||||
then
|
||||
echo $(acpi -V | grep 'Battery 0' | head -n 1 | cut -f2 -d, | sed 's/ //')
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue