From: Christian Heller Date: Thu, 20 Mar 2025 07:00:02 +0000 (+0100) Subject: Add volume commands. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%22https:/validator.w3.org/tasks?a=commitdiff_plain;h=9825fdc46654fad056825a153746fc782119662c;p=config Add volume commands. --- diff --git a/testing/home/desktop/.local/bin/vol b/testing/home/desktop/.local/bin/vol new file mode 100755 index 0000000..80f427d --- /dev/null +++ b/testing/home/desktop/.local/bin/vol @@ -0,0 +1,8 @@ +#!/bin/sh +if [ "$1" = "m" ]; then + pacmd set-sink-mute 0 1 +elif [ "$1" = "u" ]; then + pacmd set-sink-mute 0 0 +else + pacmd set-sink-volume 0 $(calc "($1 * 65536 // 100)") +fi diff --git a/testing/home/t490s/.nonpath_bins/status.sh b/testing/home/t490s/.nonpath_bins/status.sh index ce1a433..6bcf114 100755 --- a/testing/home/t490s/.nonpath_bins/status.sh +++ b/testing/home/t490s/.nonpath_bins/status.sh @@ -136,7 +136,7 @@ print_volume() { MUTE= COLOR="${COL_RED}" fi - print_bar_block "v:${MUTE}$(pactl get-sink-volume 0 | head -1 | cut -d' ' -f5)" "${COLOR}" + print_bar_block "v:${MUTE}$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)" "${COLOR}" } print_keyboard() {