#!/bin/sh # Dependencies: pactl, awk volume=$(pactl list sinks | awk '/^\s+Volume:/ {print $5}' | head -n 1 | tr -d '%') muted=$(pactl list sinks | awk '/^\s+Mute:/ {print $2}' | head -n 1) if [ "$muted" = "yes" ]; then icon="󰝟" else if [ "$volume" -le 20 ]; then icon="󰕿" elif [ "$volume" -le 50 ]; then icon="󰖀" elif [ "$volume" -le 100 ]; then icon="󰕾" else icon="󰝝" fi fi echo "$icon $volume%"