summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-02 04:20:57 +0100
committerjao <jao@gnu.org>2021-06-02 04:20:57 +0100
commit5eb4401bd75f596e5c906784158418a75d641f8f (patch)
treeca57803966327886418cb9e1c89560b353214010 /src
parentf83dbd551de2d55122d8f338f024c2a23da2a51c (diff)
downloadxmobar-config-5eb4401bd75f596e5c906784158418a75d641f8f.tar.gz
xmobar-config-5eb4401bd75f596e5c906784158418a75d641f8f.tar.bz2
clean-ups
Diffstat (limited to 'src')
-rw-r--r--src/TopC.hs33
-rw-r--r--src/lib/Monitors.hs9
2 files changed, 22 insertions, 20 deletions
diff --git a/src/TopC.hs b/src/TopC.hs
index c8bc447..0d78929 100644
--- a/src/TopC.hs
+++ b/src/TopC.hs
@@ -11,16 +11,14 @@ topProcL p = TopProc (p <~> ["-t"
, "-w", "12", "-L" , "10", "-H", "80"]) 15
diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")]
(diskArgs p) 10
+diskIOS p = DiskIO [("/", "<total>"), ("/home", "<total>")]
+ (diskArgs p) 10
+mpd a p i =
+ MPDX [ "-W", "12", "-b", "░", "-f", "▒", "-t", "<statei> <remaining>"
+ , "--", "-p", p, "-P", fni "\xf144", "-Z", fni i, "-S", fni i] 20 a
-mpd a p t i =
- MPDX [ "-W", "12", "-b", "░", "-f", "▒", "-t", t
- , "--", "-p", p, "-P", fni "\xf144", "-Z", i, "-S", i] 20 a
-
-music = concatMonitor " " m ms
- where m = mpd "mpd" "6600" "<statei> <remaining>" icm
- ms = mpd "mopidy" "6669" "<statei> <ppos>/<plength> <remaining>" ics
- icm = fni "\xf001"
- ics = fni "\xf1bc"
+mpdMon = mpd "mpd" "6600" "\xf001"
+mopMon = mpd "mopidy" "6669" "\xf1bc"
config p = (baseConfig p) {
position = TopSize C 100 (defaultHeight - 1)
@@ -30,13 +28,14 @@ config p = (baseConfig p) {
defaultHeight - 8, defaultHeight - 8]
, border = FullB
, commands = [ Run (topProcL p)
- , Run m
+ , Run mpdMon
+ , Run mopMon
, Run (thinkTemp p)
, Run (NamedXPropertyLog "_EMACS_LOG" "elog")
- , Run (cpuBars p)
+ , Run (cpu p)
, Run memoratio
, Run (diskU p)
- , Run (diskIOL p)
+ , Run (diskIOS p)
, Run brightness'
, Run (kbd p)
, Run (iconBatt p)
@@ -53,15 +52,15 @@ config p = (baseConfig p) {
++ "|batt0| "
++ dimi "\xf26c" ++ " |bright| "
++ "<action=`toggle-app.sh nm-applet`> |proton0||wlp1s0wi|</action>"
- ++ " |dynnetwork| "
++ "<action=`toggle-app.sh pasystray`>"
++ " |default:Master| " ++ dimi "\xf130" ++ " |default:Capture|"
++ "</action> "
- ++ ma
+ ++ "|mpd| |mopidy|"
++ " |EGPH| "
- ++ " {} "
++ fc (pHigh p) "|elog|"
+ ++ " {} "
++ "|kbd| "
+ ++ " |dynnetwork| "
++ "|multicpu| "
++ "|multicoretemp| "
++ " |top| "
@@ -70,9 +69,7 @@ config p = (baseConfig p) {
++ " |datetime| "
++ "|laTime| "
} where dimi = fc (pDim p) . fni
- m = music
- ma = " |" ++ alias m ++ "| "
- w = (weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p)
+ w = weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p
main :: IO ()
main = palette >>= configFromArgs . config >>= xmobar
diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs
index 8f8f81c..9eb0447 100644
--- a/src/lib/Monitors.hs
+++ b/src/lib/Monitors.hs
@@ -50,11 +50,16 @@ topProc' p = TopProc (p <~> ["-t" , "<mboth1> <mboth2> <mboth3> \
\· <both1> <both2> <both3>"
, "-w", "10", "-L" , "10", "-H", "80"]) 15
-wireless p n = Wireless n (p >~< ["-t" , fc (pLow p) (fni "\xf1eb " ++ "<essid>")
+wireless p n = Wireless n (p >~< ["-t", "<essid>"
+ -- fc (pLow p) (fni "\xf1eb " ++ "<essid>")
-- <quality>\xf09e
, "-W", "5", "-M", "15" , "-m", "3"
, "-L", "20", "-H", "80"]) 20
+cpu p = MultiCpu (p <~> ["-t", "<total>"
+ , "-S", "on", "-c", " " , "-L", "30", "-H", "70"
+ , "-p", "3", "-a", "l"]) 10
+
multiCPU p = MultiCpu (p <~> ["-t", "<autototal>"
, "-S", "on", "-b", " ", "-f", "*"
, "-c", " " , "-L", "30", "-H", "70"
@@ -224,6 +229,6 @@ netdev name icon =
proton0 = netdev "proton0" $ fn 2 "🔒 " -- fni "\xf0e8 "
laTime = DateZone "%H" "en_US" "US/Pacific" "laTime" 10
-localTime = Date "%R" "datetime" 10
+localTime = Date "%a %d %R" "datetime" 10
trayPadding = Com "padding-icon.sh" [] "tray" 20