From 615f2cb5ac72c6d24cecc2a2aec59bd5f17fbc29 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:04:16 +0300 Subject: [PATCH] change volume script --- config/xmobar/scripts/pulsevol.sh | 10 ++++++++++ config/xmobar/scripts/volume.sh | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100755 config/xmobar/scripts/pulsevol.sh delete mode 100755 config/xmobar/scripts/volume.sh diff --git a/config/xmobar/scripts/pulsevol.sh b/config/xmobar/scripts/pulsevol.sh new file mode 100755 index 00000000..dc2d6766 --- /dev/null +++ b/config/xmobar/scripts/pulsevol.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +vol=$(pamixer --get-volume) +mute=$(pamixer --get-mute) + +if [ $mute = 'true' ]; then + echo MUTED +else + echo Vol: $vol% +fi diff --git a/config/xmobar/scripts/volume.sh b/config/xmobar/scripts/volume.sh deleted file mode 100755 index abd81b40..00000000 --- a/config/xmobar/scripts/volume.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Get the maximum volume of any pulseaudio sink channel -# amixer get Master | egrep -o "[0-9]+%" -vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1) - -echo Vol: $vol%