2025-06-22 21:18:32 +03:00

9 lines
298 B
Bash
Executable File

#!/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