From 9f20c1f313e20102dd83adeaf091284be1fd82d0 Mon Sep 17 00:00:00 2001 From: "eric.marin" Date: Wed, 11 Sep 2024 14:49:39 +0200 Subject: config --- eww/scripts/getvol | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 eww/scripts/getvol (limited to 'eww/scripts/getvol') diff --git a/eww/scripts/getvol b/eww/scripts/getvol new file mode 100755 index 0000000..4e4275d --- /dev/null +++ b/eww/scripts/getvol @@ -0,0 +1,12 @@ +#!/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 -- cgit v1.2.3