From: Andre Ramnitz Date: Wed, 25 Jun 2025 21:08:21 +0000 (+0200) Subject: local/bin: add some scripts to control volume X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=e4602cdea48f84dc677823b3bc3ad56e5089faf9;p=dotfiles.git local/bin: add some scripts to control volume --- diff --git a/dot-local/bin/wp+ b/dot-local/bin/wp+ new file mode 100755 index 00000000..c758afc5 --- /dev/null +++ b/dot-local/bin/wp+ @@ -0,0 +1,11 @@ +#!/bin/dash + +wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ + +# Get the volume level and convert it to a percentage +volume=$(wpctl get-volume @DEFAULT_AUDIO_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}%" + diff --git a/dot-local/bin/wp- b/dot-local/bin/wp- new file mode 100755 index 00000000..d9bd42bc --- /dev/null +++ b/dot-local/bin/wp- @@ -0,0 +1,11 @@ +#!/bin/dash + +wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + +# Get the volume level and convert it to a percentage +volume=$(wpctl get-volume @DEFAULT_AUDIO_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}%" + diff --git a/dot-local/bin/wp-vol b/dot-local/bin/wp-vol new file mode 100755 index 00000000..2b89c1ad --- /dev/null +++ b/dot-local/bin/wp-vol @@ -0,0 +1,9 @@ +#!/bin/dash + +# Get the volume level and convert it to a percentage +volume=$(wpctl get-volume @DEFAULT_AUDIO_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}%" +