2026-03-15 20:20:28 +01:00
|
|
|
#!/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")
|
|
|
|
|
|
2026-03-16 19:35:45 +01:00
|
|
|
if string match '*[MUTED]' (wpctl get-volume @DEFAULT_AUDIO_SINK@)
|
|
|
|
|
set text "muted"
|
|
|
|
|
else
|
|
|
|
|
set text "$volume%"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
notify-send -c 'status' -h int:value:$volume "Volume" "$text"
|