summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-08-08 15:36:58 +0100
committerjao <jao@gnu.org>2022-08-08 15:36:58 +0100
commit2b75f89cd3afcb1d461c129a4d45042314f61d2c (patch)
tree1e39bcf45195ca7a8e3022681d5cd9ba04096dc2 /src
parent0c9f43cbd97617be3d9f82391b2b58398b837b86 (diff)
downloadxmobar-config-2b75f89cd3afcb1d461c129a4d45042314f61d2c.tar.gz
xmobar-config-2b75f89cd3afcb1d461c129a4d45042314f61d2c.tar.bz2
tweaks for xmonad
Diffstat (limited to 'src')
-rw-r--r--src/TopC.hs66
-rw-r--r--src/lib/Monitors.hs2
2 files changed, 34 insertions, 34 deletions
diff --git a/src/TopC.hs b/src/TopC.hs
index c4a17ce..c8e5115 100644
--- a/src/TopC.hs
+++ b/src/TopC.hs
@@ -11,7 +11,7 @@ topProcL p = TopProc (p <~> ["-t"
, "-w", "12", "-L" , "10", "-H", "80"]) 15
where memTemp = if pIsLight p
then "<both1> <both2> <both3> <both4>"
- else "<both1> <both2> <both3>"
+ else "<both1> <both2> <both3> <both4>"
diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")]
(diskArgs p) 10
@@ -25,38 +25,35 @@ mpd a p i =
mpdMon = mpd "mpd" "6600" "\xf001"
mopMon = mpd "mopidy" "6669" "\xf1bc"
-mail' p = MailX [ ("J", "jao.inbox", pHigh p)
- , ("H", "jao.hacking", "")
- , ("b", "bigml.bugs", pHigh p)
- , ("B", "bigml.inbox", "")
- , ("S", "bigml.support", "")
- -- , ("W", "bigml.drivel", pLow p)
- -- , ("l", "bigml.lists", pLow p)
- -- , ("D", "jao.drivel", pLow p)
- -- , ("F", "feeds", pLow p)
- -- , ("E", "feeds.emacs", pLow p)
- -- , ("P", "feeds.prog", pLow p)
- -- , ("w", "feeds.words", pLow p)
- ]
- [ "-d", "~/var/mail" , "-s", " "] "mail"
+cpuFreq' p = CpuFreq (p <~> ["-t" , "<avg>"
+ , "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"]) 50
+
+cpus p = MultiCpu (mkArgs p
+ ["--template" , "<autobar> <total>%"
+ , "-L", "50", "-H", "85", "-W", "0", "-w", "3"
+ , "-f", "0123456789"]
+ ["--fallback-icon-pattern", "<icon=load_%%.xpm/>"]) 10
+
+
+memory' = Memory [ "-t" ,"<usedbar> <usedratio>"
+ , "-p", "2", "-W", "0","-d", "1", "-f", "0123456789"
+ , "--", "--scale", "1024"] 20
-mail'' p = MailX [] [ "-d", "~/var/mail" , "-s", " "] "mail"
config p = (baseConfig p) {
- position = TopSize C 100 (defaultHeight - 1)
- , font = "xft:Roboto Mono-8"
+ position = TopSize C 100 (defaultHeight - 2)
+ , font = "xft:Hack-8"
, textOffset = defaultHeight - 8
, textOffsets = [defaultHeight - 9, defaultHeight - 9,
defaultHeight - 6, defaultHeight - 8,
defaultHeight - 8, defaultHeight - 8]
- , alpha = 192
+ , alpha = if pIsLight p then 192 else 230
, border = FullB
, commands = [ Run (topProcL p)
, Run (load p)
, Run (iconBatt p)
- , Run mpdMon
- , Run (NamedXPropertyLog "_EMACS_LOG" "elog")
, Run (cpu p)
+-- , Run (cpus p)
, Run memory
, Run (diskU p)
, Run (diskIOS p)
@@ -71,11 +68,13 @@ config p = (baseConfig p) {
, Run captureVol
, Run laTime
, Run localTime
+ , Run (cpuFreq' p)
, Run w -- LEGE, LEBL, KCV0
- ] ++ trayC
+ ] ++ extraCmds
, template = trayT
++ " |batt0|" ++ sep
- ++ dimi "\xf26c" ++ " |bright|" ++ sep
+ -- ++ dimi "\xf26c" ++ sep
+ ++ "|bright|" ++ sep
++ "<action=`toggle-app.sh nm-applet`>"
++ " |wg-mullvad||tun0||wlp164s0wi|"
++ "</action>"
@@ -83,15 +82,14 @@ config p = (baseConfig p) {
++ "<action=`toggle-app.sh pasystray`>"
++ " |default:Master| " ++ dimi "\xf130" ++ " |default:Capture|"
++ "</action>" ++ sep
- ++ "|mpd|" ++ sep
- ++ " |EGPH| "
- ++ fc (pHigh p) "|elog|"
+ ++ " |EGPH| " ++ sep
+ ++ eLog p
++ " {} "
++ "|kbd|" ++ sep
--- ++ "|mail|" ++ sep
- ++ "|load| " ++ sep
- ++ "|multicpu| "
- ++ "|multicoretemp| " ++ sep
+ ++ "|load|" ++ sep
+ ++ "|cpufreq|" ++ sep
+ ++ "|multicpu|" ++ sep
+ ++ "|multicoretemp|" ++ sep
++ " |top| " ++ sep
++ " " ++ fni "\xf0c9" ++ " |memory| "
++ " |diskio| |disku| " ++ sep
@@ -102,9 +100,11 @@ config p = (baseConfig p) {
w = weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p
isXmonad = pWm p == Just "xmonad"
trayT = if isXmonad then "|tray|" else ""
- trayC = if isXmonad
- then [Run (NamedXPropertyLog "_XMONAD_TRAYPAD" "tray")]
- else []
+ eLog p = if isXmonad then "|XMonadLog|" else fc (pHigh p) "|elog|"
+ extraCmds = if isXmonad
+ then [ Run (NamedXPropertyLog "_XMONAD_TRAYPAD" "tray")
+ , Run XMonadLog]
+ else [Run (NamedXPropertyLog "_EMACS_LOG" "elog")]
main :: IO ()
main = palette >>= configFromArgs . config >>= xmobar
diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs
index 82e2e48..3cede52 100644
--- a/src/lib/Monitors.hs
+++ b/src/lib/Monitors.hs
@@ -72,7 +72,7 @@ cpuBars p = MultiCpu (mkArgs p
, "--contiguous-icons"])
10
-cpuFreq p = CpuFreq (p <~> ["-t" , "<cpu0> <cpu1> <cpu2> <cpu3>"
+cpuFreq p = CpuFreq (p <~> ["-t" , "<avg> <max> <min> <cpu0> <cpu1> <cpu2> <cpu3>"
, "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"]) 50
-- ⤒⤊⍐ ⊼ ⇧ ⇩ ⎗ ⎘