summaryrefslogtreecommitdiffhomepage
path: root/src/TopC.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/TopC.hs')
-rw-r--r--src/TopC.hs47
1 files changed, 24 insertions, 23 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