From b01159db4b5202399480f1feb06c8177d9d58652 Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 28 Nov 2024 16:48:51 +0100 Subject: [PATCH] rebased to pactl --- desktopenvs/hyprland/eww/scripts/getvol | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/desktopenvs/hyprland/eww/scripts/getvol b/desktopenvs/hyprland/eww/scripts/getvol index 4e4275d..86b6270 100755 --- a/desktopenvs/hyprland/eww/scripts/getvol +++ b/desktopenvs/hyprland/eww/scripts/getvol @@ -1,12 +1,5 @@ #!/bin/sh -if command -v pamixer &>/dev/null; then - if [ true == $(pamixer --get-mute) ]; then - echo 0 - exit - else - pamixer --get-volume - fi -else - amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}' -fi +perc=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F/ '{print $2}' | xargs) +num=$(echo ${perc::-1}) +echo $num