diff options
| author | Andrew <saintruler@gmail.com> | 2020-12-22 13:36:05 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2020-12-22 13:36:05 +0400 |
| commit | 0bac11af6ff10ff4f68fa15417d6569ff5771b49 (patch) | |
| tree | e16d8370f1ee5a2f76a1cc0c12f21748f1efa245 | |
| parent | c366e931cc3dd58dc954cfe7f0bddce6c59cfc9b (diff) | |
Changed xmonad and xmobar config and removed emojis from volume script
| -rw-r--r-- | .config/xmonad/xmobarrc | 2 | ||||
| -rw-r--r-- | .config/xmonad/xmonad.hs | 2 | ||||
| -rwxr-xr-x | .local/bin/statusbar/volume | 18 | ||||
| -rw-r--r-- | .xprofile | 2 |
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, ' ')}%") @@ -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" |