From a0b32034f7c557bcaa38e3610c8a97eeee7a00a8 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Sun, 29 Jun 2025 22:28:05 +0200 Subject: Initial commit --- dot-local-bin/wp-vol | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 dot-local-bin/wp-vol (limited to 'dot-local-bin/wp-vol') diff --git a/dot-local-bin/wp-vol b/dot-local-bin/wp-vol new file mode 100755 index 0000000..4ae235c --- /dev/null +++ b/dot-local-bin/wp-vol @@ -0,0 +1,8 @@ +#!/usr/bin/env fish + +wpctl set-volume @DEFAULT_AUDIO_SINK@ $argv[1] + +# Get the volume level and convert it to a percentage +set volume (math -s0 -mround (wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}') "*" 100) + +notify-send -t 1000 -a 'wp-vol' -h int:value:$volume " $volume" -- cgit v1.2.3