From c0980174311420f1a9fb843ebc1f83cfdd5ab6c9 Mon Sep 17 00:00:00 2001 From: Cristian Miranda Date: Sun, 7 Jan 2024 19:06:46 -0300 Subject: [PATCH] :wrench: polybar[volume]: display dock icon for CalDigit --- home/.config/polybar/config.ini | 2 +- home/.config/polybar/scripts/mic-status | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/.config/polybar/config.ini b/home/.config/polybar/config.ini index da7e57e9..00d9335f 100644 --- a/home/.config/polybar/config.ini +++ b/home/.config/polybar/config.ini @@ -258,7 +258,7 @@ label = %title:0:60:...% type = custom/script tail = true label-foreground = ${colors.foreground} -exec = pulseaudio-control --icons-volume " , " --icon-muted " " --node-nicknames-from "device.description" --node-nickname "*CalDigit*:CalDigit" --node-nickname "*HiFi__hw_sof*: " --node-nickname "*bluez*:󰋋 " --node-nickname "*hdmi*: " --node-nickname "*USB*Audio*:󰓃" --format '$NODE_NICKNAME %{T6}${VOL_LEVEL}%%{T-}' listen +exec = pulseaudio-control --icons-volume " , " --icon-muted " " --node-nicknames-from "device.description" --node-nickname "*CalDigit*:󱂩" --node-nickname "*HiFi__hw_sof*: " --node-nickname "*bluez*:󰋋 " --node-nickname "*hdmi*: " --node-nickname "*USB*Audio*:󰓃" --format '$NODE_NICKNAME %{T6}${VOL_LEVEL}%%{T-}' listen # click-right = exec pavucontrol & click-left = pulseaudio-control togmute # click-middle = pulseaudio-control --node-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-node diff --git a/home/.config/polybar/scripts/mic-status b/home/.config/polybar/scripts/mic-status index db8f3ffb..7a958550 100755 --- a/home/.config/polybar/scripts/mic-status +++ b/home/.config/polybar/scripts/mic-status @@ -3,7 +3,7 @@ MUTED_COLOR="#FF6961" UNMUTED_COLOR="#8BC34A" -DEVICE_ICON=$(pulseaudio-control --node-type input --node-nicknames-from "device.description" --node-nickname "*HD_Pro_Webcam*:󰖠" --node-nickname "*CalDigit*:CalDigit" --node-nickname "*HiFi__hw_sof*:" --node-nickname "*bluez*:󰋋" --node-nickname "*analog*:" --node-nickname "*USB*Audio*:󰓃" --node-blacklist "*.monitor" --format '${NODE_NICKNAME}' output | sed -E 's/%\{F#[0-9a-fA-F]{6}\}([^%]*)%\{F-\}/\1/g') +DEVICE_ICON=$(pulseaudio-control --node-type input --node-nicknames-from "device.description" --node-nickname "*HD_Pro_Webcam*:󰖠" --node-nickname "*CalDigit*:󱂩" --node-nickname "*HiFi__hw_sof*:" --node-nickname "*bluez*:󰋋" --node-nickname "*analog*:" --node-nickname "*USB*Audio*:󰓃" --node-blacklist "*.monitor" --format '${NODE_NICKNAME}' output | sed -E 's/%\{F#[0-9a-fA-F]{6}\}([^%]*)%\{F-\}/\1/g') MUTED="$(pactl list short sources | awk '/input.*RUNNING/ {system("pactl get-source-mute " $1)}' | sed 's/Mute: //g' | uniq)" if [[ $MUTED == "no" ]]; then