summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/xmonad/xmobarrc2
-rw-r--r--.config/xmonad/xmonad.hs2
-rwxr-xr-x.local/bin/statusbar/volume18
-rw-r--r--.xprofile2
4 files changed, 11 insertions, 13 deletions
diff --git a/.config/xmonad/xmobarrc b/.config/xmonad/xmobarrc
index cd9e62e..8ff0542 100644
--- a/.config/xmonad/xmobarrc
+++ b/.config/xmonad/xmobarrc
@@ -43,7 +43,7 @@ Config {
-- Check for package updates every ~16 minutes
, Run Com "pacpackages" [] "packages" 10000
- , Run Com "volume" [] "" 5
+ , Run Com "volume" ["Volume: <fc=#02d310>%s</fc>"] "" 5
, Run Alsa "default" "Master" []
diff --git a/.config/xmonad/xmonad.hs b/.config/xmonad/xmonad.hs
index f3c69e2..8eb46a1 100644
--- a/.config/xmonad/xmonad.hs
+++ b/.config/xmonad/xmonad.hs
@@ -33,7 +33,7 @@ import Graphics.X11.ExtraTypes.XF86
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
-myTerminal = "st"
+myTerminal = "$TERMINAL"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
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, ' ')}%")
diff --git a/.xprofile b/.xprofile
index 55b4afb..f05de6f 100644
--- a/.xprofile
+++ b/.xprofile
@@ -36,6 +36,6 @@ compton -c --config $XDG_CONFIG_HOME/compton/compton.conf $compositor_args &
fi
-export TERMINAL="st"
+export TERMINAL="alacritty"
export EDITOR="nvim"
export BROWSER="firefox"