From 0a608bd781dcda40144097b007fac0a0c60a8ee1 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 1 Aug 2023 15:31:42 +0200 Subject: Refactor(treewide): Move module configuration in separate files --- .../config/yambar/scripts/old/amixer-monitor | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 home-manager/soispha/config/yambar/scripts/old/amixer-monitor (limited to 'home-manager/soispha/config/yambar/scripts/old/amixer-monitor') diff --git a/home-manager/soispha/config/yambar/scripts/old/amixer-monitor b/home-manager/soispha/config/yambar/scripts/old/amixer-monitor new file mode 100755 index 00000000..9e75acfa --- /dev/null +++ b/home-manager/soispha/config/yambar/scripts/old/amixer-monitor @@ -0,0 +1,24 @@ +#!/bin/sh +# An improved amixer script that actually detects volume beyond 100% + + +SLEEPTIME=1 + + +while true; do + + volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/"} {print $2 }' | tr -d "%" | tr -d ' ') + + if [ "$volume" -eq 0 ]; then + echo "muted|bool|true" + + else + # Read sink volume in percentages + echo "volume|string|$volume" + echo "muted|bool|false" + fi + + echo "" + sleep "$SLEEPTIME" + +done -- cgit 1.4.1