#!/bin/bash muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}') if [ "$muted" = "yes" ]; then echo "{\"text\":\" MUTE\",\"tooltip\":\"Volume muted\"}" else echo "{\"text\":\" $vol\",\"tooltip\":\"Volume\"}" fi