Slightly different color for statusbar item's icon.

This commit is contained in:
Bartek Stalewski 2022-04-15 00:44:28 +02:00
parent 826a05826d
commit 4ff14f25fd
6 changed files with 31 additions and 37 deletions

17
_suckless/_scripts/sb-vol-in Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
if [ "${1}" = "micmute" ]; then
state=$(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}')
case ${state} in
yes)
echo 0 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness
pactl set-source-mute @DEFAULT_SOURCE@ 0 ;;
no)
echo 1 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness
pactl set-source-mute @DEFAULT_SOURCE@ 1 ;;
esac
kill -44 $(pidof dwmblocks)
else
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && printf "^c#ffffff^\uf131 ^c#ffffff^^b#770000^mute^d^"
fi