summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2020-12-22 13:36:05 +0400
committerAndrew <saintruler@gmail.com>2020-12-22 13:36:05 +0400
commit0bac11af6ff10ff4f68fa15417d6569ff5771b49 (patch)
treee16d8370f1ee5a2f76a1cc0c12f21748f1efa245 /.local/bin
parentc366e931cc3dd58dc954cfe7f0bddce6c59cfc9b (diff)
Changed xmonad and xmobar config and removed emojis from volume script
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/statusbar/volume18
1 files changed, 8 insertions, 10 deletions
diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume
index ef9fe17..f60684e 100755
--- a/.local/bin/statusbar/volume
+++ b/.local/bin/statusbar/volume
@@ -2,6 +2,7 @@
import subprocess
import re
import os
+import sys
block = os.getenv("BLOCK_BUTTON")
@@ -77,17 +78,14 @@ for sink in sinks.values():
mute = sink["Mute"] == "yes"
+format_string = "%i"
+if len(sys.argv) > 1:
+ format_string = sys.argv[1]
if vol is None or mute:
- print("婢 [ Mute ] 0%")
- quit(0)
-
-if vol > 70:
- icon = "墳 "
-elif vol > 30:
- icon = "奔 "
+ vol = "Muted"
else:
- icon = "奄 "
+ v = vol // 10
+
+print(format_string % vol)
-v = vol // 10
-print(f"{icon}[{'*' * v}{' ' * (10 - v)}] {str(vol).rjust(3, ' ')}%")