1 2 3 4 5 6 7 8 9
#!/bin/sh cur_vol=$(pamixer --get-volume) if [ $(pamixer --get-mute) = true ]; then printf 'mt \n' "$cur_vol" else printf '%02d \n' "$cur_vol" fi