Files
dots/config/dunst/scripts/volume.sh
2025-11-24 19:46:30 +07:00

14 lines
434 B
Bash
Executable File

#!/bin/bash
volume=$(amixer -D pulse sget Master | tail -1 | awk -F'[][]' '{print $2}' | sed 's/%//g')
if [[ "$volume" -eq "0" ]]; then
icon="$HOME/.config/dunst/scripts/volume-mute.svg"
elif [[ "$volume" -lt "100" ]]; then
icon="$HOME/.config/dunst/scripts/volume-normal.svg"
else
icon="$HOME/.config/dunst/scripts/volume-max.svg"
fi
dunstify -a "volume" -i "$icon" -r 3456 -h int:value:"$volume" "Volume: ${volume}%"