Files
amazing-dotfiles/scripts/wp-vol.sh
2026-02-22 20:46:25 +01:00

9 lines
281 B
Bash
Executable File

#!/usr/bin/env bash
#
# Get the volume level and convert it to a percentage
volume=$(wpctl get-volume @DEFAULT_SINK@)
volume=$(echo "$volume" | awk '{print $2}')
volume=$(echo "( $volume * 100 ) / 1" | bc)
notify-send -t 1000 -a 'wp-vol' -h int:value:$volume "Volume: ${volume}%"