dotfiles/.local/scripts/volumenotify.fish

8 lines
235 B
Fish
Raw Normal View History

#!/usr/bin/env fish
set volume (string match -r '[0-9]+.[0-9]+' (wpctl get-volume @DEFAULT_AUDIO_SINK@))
set volume (math --scale 0 --scale-mode round "$volume * 100")
notify-send -c 'status' -h int:value:$volume "Volume: $volume%"