From 3f3a08b8dd3137a58d6cd496cf044eedf664e14a Mon Sep 17 00:00:00 2001 From: randomuser Date: Tue, 11 May 2021 21:53:13 -0500 Subject: [PATCH] add volume script --- Makefile | 1 + scripts/indicate | 3 ++- scripts/vol | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 scripts/vol diff --git a/Makefile b/Makefile index 211872e..134e615 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ sh: cp -f scripts/nws $(DESTDIR)$(PREFIX)/bin cp -f scripts/urlhandle $(DESTDIR)$(PREFIX)/bin cp -f scripts/indicate $(DESTDIR)$(PREFIX)/bin + cp -f scripts/vol $(DESTDIR)$(PREFIX)/bin mkc: cc progs/scream.c -o progs/scream c: diff --git a/scripts/indicate b/scripts/indicate index 45e9b12..4c84c42 100755 --- a/scripts/indicate +++ b/scripts/indicate @@ -2,4 +2,5 @@ i=$(date '+%H:%M:%S %m/%d (%h)') j=$(bat) -printf "%s | %s\n" "$i" "$j" | nenu +k=$(vol) +printf "%s | %s\% | %s\n" "$i" "$j" "$k" | nenu diff --git a/scripts/vol b/scripts/vol new file mode 100644 index 0000000..1a71217 --- /dev/null +++ b/scripts/vol @@ -0,0 +1,3 @@ +#!/bin/sh + +amixer sset Master 0amixer sset Master 0%+ | tail -1 | awk -F'[' '{print }' | awk -F']' '{print }'