dotfiles/_suckless/_scripts/sb-volume

9 lines
355 B
Bash
Executable File

#!/bin/sh
vol="$(pamixer --get-volume)"
device=$(pamixer --list-sources | awk '/Raven/ {print $1}')
[ $(echo $vol | wc -c) -lt 4 ] && svol=" ${vol}%" || svol="${vol}%"
[ $(pamixer --get-mute) = true ] && icon="🔇" || icon="🔊"
[ $(pamixer --source $device --get-mute) = true ] && micon="🔇" || micon="🎙️"
echo "${icon} ${svol} (mic ${micon})"