Made the waybar a sidebar
This commit is contained in:
parent
75f6e5bb47
commit
6980360fe4
10 changed files with 121 additions and 50 deletions
28
.config/waybar/scripts/pulseaudio.sh
Executable file
28
.config/waybar/scripts/pulseaudio.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/env sh
|
||||
|
||||
SPEAKER_ICON=" "
|
||||
HEADPHONE_ICON=" "
|
||||
|
||||
declare -A ICON_DEVICES
|
||||
ICON_DEVICES[alsa_output.usb-Razer_Razer_Nari-00.pro-output-1]=$HEADPHONE_ICON
|
||||
ICON_DEVICES[alsa_output.pci-0000_08_00.0.iec958-stereo]=$SPEAKER_ICON
|
||||
|
||||
ICON_VOLMUES=" , "
|
||||
ICON_VOLUME_MUTED=" "
|
||||
|
||||
NICKNAME_SOURCE="device.nick"
|
||||
|
||||
FORMAT_DEFAULT='$VOL_ICON ${VOL_LEVEL}% $ICON_NODE $NODE_NICKNAME'
|
||||
FORMAT_ICONS='$VOL_ICON $ICON_NODE $NODE_NICKNAME'
|
||||
|
||||
icon_devices_parameters=""
|
||||
for device in "${!ICON_DEVICES[@]}"; do
|
||||
icon_devices_parameters="${icon_devices_parameters} --node-nickname "${device}:${ICON_DEVICES[$device]}""
|
||||
done
|
||||
|
||||
format=$FORMAT_DEFAULT
|
||||
if [[ $1 == 'icons' ]]; then
|
||||
format=$FORMAT_ICONS
|
||||
fi
|
||||
|
||||
pulseaudio-control ${icon_devices_parameters} --icons-volume "${ICON_VOLMUES}" --icon-muted "${ICON_VOLUME_MUTED}" --node-nicknames-from "${NICKNAME_SOURCE}" --format "${format}" --color-muted "" listen
|
||||
Loading…
Add table
Add a link
Reference in a new issue