summaryrefslogtreecommitdiffhomepage
path: root/src/Bottom.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2018-12-01 13:00:04 +0000
committerjao <jao@gnu.org>2018-12-01 13:00:04 +0000
commit836bcb7286275969ce4b22ad130384652c5821e8 (patch)
treee06b1adda60eefa75e74a128312b083c62aec441 /src/Bottom.hs
parentb364bf310522e8304d644a77f335f47067a05500 (diff)
downloadxmobar-config-836bcb7286275969ce4b22ad130384652c5821e8.tar.gz
xmobar-config-836bcb7286275969ce4b22ad130384652c5821e8.tar.bz2
Working xmobar top/bottom configurations
Diffstat (limited to 'src/Bottom.hs')
-rw-r--r--src/Bottom.hs83
1 files changed, 83 insertions, 0 deletions
diff --git a/src/Bottom.hs b/src/Bottom.hs
new file mode 100644
index 0000000..1c70548
--- /dev/null
+++ b/src/Bottom.hs
@@ -0,0 +1,83 @@
+module Bottom (config) where
+
+import Xmobar
+import Config
+
+uptime p = Uptime (p <~> [ "-t" , "<days> <hours>", "-m", "3", "-c", "0", "-S"
+ , "On" , "-L", "10", "-H", "100"]) 600
+
+weather st =
+ Weather st ["-t", "<tempC>° <rh>% <windKmh> <skyCondition> (<hour>)"
+ , "-L","10", "-H", "25", "--normal", "black",
+ "--high", "lightgoldenrod4", "--low", "darkseagreen4"] 18000
+
+batt p =
+ BatteryN ["BAT0"]
+ ((p <~> ["-t", "<left>%<acstatus>"
+ , "-S", "Off", "-d", "0", "-m", "3"
+ , "-L", "10", "-H", "80", "-p", "3"])
+ ++ [ "--"
+ , "-i", "", "-O", " <timeleft> <watts>"
+ , "-o", " <timeleft> <watts>"
+ , "-H", "16", "-L", "10"
+ , "-h", "sienna4", "-l", "gray20"]) 50 "b0"
+
+coreTemp p =
+ CoreTemp (p <~> ["-t", "<core1>° <core2>°"
+ , "-L", "50", "-H", "75", "-d", "0"]) 50
+
+diskU p =
+ DiskU [("dm-1", "<used>") , ("/media/sdb", " s <used>")]
+ (p <~> ["-L", "20", "-H", "70", "-m", "1", "-p", "3"])
+ 20
+
+diskIO p =
+ DiskIO [("dm-1", "↑ <read> ↓ <write>")]
+ (p <~> ["-L", "20", "-H", "5000", "-m", "5", "-p", "3"]) 10
+
+mbox = MBox [ ("I", "inbox", "darkseagreen4")
+ , ("B", "bigml.spool", "sienna4")
+ , ("S", "bigsup.spool", "sienna4")
+ , ("b", "bugml.spool", "sienna4")
+ , ("G", "geiser.spool", "darkseagreen4")
+ , ("X", "xmobar.spool", "darkseagreen4")
+ , ("g", "gnu.spool", "")
+ , ("k", "books.spool", "")
+ , ("h", "hacking.spool", "")
+ , ("c", "computers.spool", "")
+ , ("w", "words.spool", "")
+ , ("t", "think.spool", "")
+ ] ["-d", "/home/jao/var/mail", "-p", " ", "-s", ""] "mbox"
+
+
+masterVol =
+ Volume "default" "Master"
+ ["-t", "<status> <volume>"
+ , "--", "-C", "black", "-c", "sienna4", "-O", ""
+ , "-o", "×"] 10
+
+captureVol = Volume "default" "Capture" ["-t", "<volume>"] 10
+
+kbd = Kbd [("us", ""), ("us(intl)", "*")]
+
+brightness = Brightness ["--", "-D", "intel_backlight"] 10
+
+memory = Memory ["-t","<available> M", "-p", "2"] 20
+
+config cs p = (baseConfig p) {
+ position = BottomSize C 100 24
+ , textOffset = 17
+ , commands = [ Run (uptime p)
+ , Run brightness
+ , Run (weather "EGPH") -- LEGE, LEBL, KCV0
+ , Run memory
+ , Run (batt p)
+ , Run (coreTemp p)
+ , Run (diskU p)
+ , Run (diskIO p)
+ , Run mbox
+ , Run masterVol
+ , Run captureVol
+ , Run kbd
+ ] ++ cs
+}