summaryrefslogtreecommitdiff
path: root/.scripts/volumecurr
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-12 23:16:46 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-12 23:16:46 +0530
commita0298de68dcf476e88f67a338a40f4c7606d17e8 (patch)
treeaf156eb8e99de00717e3fe729c055ebb4f048602 /.scripts/volumecurr
parent504a9d3a2c4ac31dba7586f3576423a98ed442be (diff)
sxhkdrc - wpctl using scripts removing pactl
Diffstat (limited to '.scripts/volumecurr')
-rwxr-xr-x.scripts/volumecurr10
1 files changed, 10 insertions, 0 deletions
diff --git a/.scripts/volumecurr b/.scripts/volumecurr
new file mode 100755
index 0000000..7b08cab
--- /dev/null
+++ b/.scripts/volumecurr
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+volume="$(wpctl get-volume @DEFAULT_SINK@)"
+volume=${volume#Volume: *}
+
+case "$volume"
+ in (*MUTED*) volume=0;;
+esac
+
+printf "%0.0f%%\n" "${volume%% *}e+2"