summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-04-16 01:32:48 +0100
committerjao <jao@gnu.org>2022-04-16 01:32:48 +0100
commit0c9f43cbd97617be3d9f82391b2b58398b837b86 (patch)
treefbdca5d52801766e0c4143b134406cef5bdd8a74 /src
parente3c13e5350291f43c94a1ad3dd323cd50b9438f9 (diff)
downloadxmobar-config-0c9f43cbd97617be3d9f82391b2b58398b837b86.tar.gz
xmobar-config-0c9f43cbd97617be3d9f82391b2b58398b837b86.tar.bz2
wee tweaks
Diffstat (limited to 'src')
-rw-r--r--src/TopC.hs47
-rw-r--r--src/lib/Config.hs2
-rw-r--r--src/lib/Monitors.hs11
3 files changed, 34 insertions, 26 deletions
diff --git a/src/TopC.hs b/src/TopC.hs
index 9eb838e..c4a17ce 100644
--- a/src/TopC.hs
+++ b/src/TopC.hs
@@ -7,10 +7,10 @@ memoratio = Memory ["-t","<usedratio>%", "-p", "2", "-W", "3"] 20
topProcL p = TopProc (p <~> ["-t"
, memTemp
- ++ " · <mboth1> <mboth2> <mboth3> <mboth4>"
+ ++ " · <mboth1> <mboth2> <mboth3> <mboth4>"
, "-w", "12", "-L" , "10", "-H", "80"]) 15
where memTemp = if pIsLight p
- then "<both1> <both2> <both3> <both4>"
+ then "<both1> <both2> <both3> <both4>"
else "<both1> <both2> <both3>"
diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")]
@@ -44,6 +44,7 @@ mail'' p = MailX [] [ "-d", "~/var/mail" , "-s", " "] "mail"
config p = (baseConfig p) {
position = TopSize C 100 (defaultHeight - 1)
+ , font = "xft:Roboto Mono-8"
, textOffset = defaultHeight - 8
, textOffsets = [defaultHeight - 9, defaultHeight - 9,
defaultHeight - 6, defaultHeight - 8,
@@ -51,13 +52,12 @@ config p = (baseConfig p) {
, alpha = 192
, border = FullB
, commands = [ Run (topProcL p)
- , Run ((if isXmonad then mail' else mail'') p)
+ , Run (load p)
, Run (iconBatt p)
, Run mpdMon
, Run (NamedXPropertyLog "_EMACS_LOG" "elog")
- , tray
- , if pIsLight p then Run (cpu p) else Run (cpuBars p)
- , Run memoratio
+ , Run (cpu p)
+ , Run memory
, Run (diskU p)
, Run (diskIOS p)
, Run brightness
@@ -72,38 +72,39 @@ config p = (baseConfig p) {
, Run laTime
, Run localTime
, Run w -- LEGE, LEBL, KCV0
--- , Run (mpris p "playerctld" 20)
- ]
- , template = "|tray| "
- ++ " |batt0| "
- ++ dimi "\xf26c" ++ " |bright| "
+ ] ++ trayC
+ , template = trayT
+ ++ " |batt0|" ++ sep
+ ++ dimi "\xf26c" ++ " |bright|" ++ sep
++ "<action=`toggle-app.sh nm-applet`>"
++ " |wg-mullvad||tun0||wlp164s0wi|"
++ "</action>"
- ++ " |dynnetwork| "
+ ++ " |dynnetwork| " ++ sep
++ "<action=`toggle-app.sh pasystray`>"
++ " |default:Master| " ++ dimi "\xf130" ++ " |default:Capture|"
- ++ "</action> "
- ++ "|mpd|"
--- ++ " |mpris2| "
+ ++ "</action>" ++ sep
+ ++ "|mpd|" ++ sep
++ " |EGPH| "
++ fc (pHigh p) "|elog|"
++ " {} "
- ++ "|kbd| "
- ++ "|mail| "
+ ++ "|kbd|" ++ sep
+-- ++ "|mail|" ++ sep
+ ++ "|load| " ++ sep
++ "|multicpu| "
- ++ "|multicoretemp| "
- ++ " |top| "
+ ++ "|multicoretemp| " ++ sep
+ ++ " |top| " ++ sep
++ " " ++ fni "\xf0c9" ++ " |memory| "
- ++ " |diskio| |disku| "
+ ++ " |diskio| |disku| " ++ sep
++ " |datetime| "
++ "|laTime| "
} where dimi = fc (pDim p) . fni
+ sep = " "
w = weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p
isXmonad = pWm p == Just "xmonad"
- tray = if isXmonad
- then Run (NamedXPropertyLog "_XMONAD_TRAYPAD" "tray")
- else Run trayPadding
+ trayT = if isXmonad then "|tray|" else ""
+ trayC = if isXmonad
+ then [Run (NamedXPropertyLog "_XMONAD_TRAYPAD" "tray")]
+ else []
main :: IO ()
main = palette >>= configFromArgs . config >>= xmobar
diff --git a/src/lib/Config.hs b/src/lib/Config.hs
index 22b077e..1840755 100644
--- a/src/lib/Config.hs
+++ b/src/lib/Config.hs
@@ -80,7 +80,7 @@ darkPalette = Palette { pNormal = zenburnFg
palette :: IO Palette
palette = do
light <- lightTheme
- wm <- lookupEnv "WM"
+ wm <- lookupEnv "wm"
let p = if light then lightPalette else darkPalette
return $ p {pWm = wm}
diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs
index 32e9acb..82e2e48 100644
--- a/src/lib/Monitors.hs
+++ b/src/lib/Monitors.hs
@@ -106,7 +106,8 @@ weather' tmp st p =
, ("light snow", fn 3 "🌨")
, ("snow", fn 3 "❄")
]
- (mkArgs p ["-t", tmp , "-L","10", "-H", "25"] ["-w", ""])
+ (mkArgs p ["-t", tmp , "-L","10", "-H", "25" , "-T", "25", "-E", ".."]
+ ["-w", ""])
18000
weather = weather' "<skyConditionS> <tempC>° <rh>% <windKmh> (<hour>)"
@@ -173,6 +174,10 @@ coreTemp p =
MultiCoreTemp (p <~> ["-t", "<avg>° <max>°"
, "-L", "50", "-H", "75", "-d", "0"]) 50
+load p =
+ Load (p <~> ["-t" , "<load1> <load5> <load15>", "-L", "1", "-H", "3", "-d", "2"])
+ 300
+
diskU p =
DiskU [("/", "<used>") , ("/media/sda", " s <used>")]
(p <~> ["-L", "20", "-H", "70", "-m", "1", "-p", "3"])
@@ -226,7 +231,9 @@ kbd p = Kbd [("us", ""), ("us(intl)", kbi pHigh)] -- kbi pDim
brightness = Brightness ["--", "-D", "intel_backlight"] 10
brightness' = Brightness ["--", "-D", "amdgpu_bl0", "-C", "brightness"] 10
-memory = Memory ["-t","<available> M", "-p", "2", "-W", "7"] 20
+memory = Memory [ "-t" ,"<used>:<available>"
+ , "-p", "2", "-W", "4","-d", "1"
+ , "--", "--scale", "1024"] 20
netdev name icon =
Network name ["-t", "<up>", "-x", "", "--", "--up", icon] 20 -- fn 2 "🔐 "