From 0bac11af6ff10ff4f68fa15417d6569ff5771b49 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 22 Dec 2020 13:36:05 +0400 Subject: Changed xmonad and xmobar config and removed emojis from volume script --- .local/bin/statusbar/volume | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to '.local') 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, ' ')}%") -- cgit v1.2.3