From 5362cd80c7714ec228a13e045140e339b96d2cb3 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 11 Aug 2022 03:17:36 +0100 Subject: xmobar-emacs tweaks --- src/Emacs.hs | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Emacs.hs b/src/Emacs.hs index 6b00ea3..f2a9a44 100644 --- a/src/Emacs.hs +++ b/src/Emacs.hs @@ -1,13 +1,12 @@ import Xmobar import Config import Monitors -import Music (mpris, gpmd, mpdt) topProcL p = TopProc (p <~> args) 15 where template = " ยท " args = ["-t", template, "-w", "12", "-L" , "10", "-H", "80"] -diskIOS p = DiskIO [("/", "โŽ— โŽ˜")] (diskArgs p) 10 +diskIOS p = DiskIO [("/", " ")] (diskArgs p) 10 cpuFreq' p = CpuFreq (p <~> args) 50 where args = ["-t" , "" , "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"] @@ -22,12 +21,28 @@ master p = Volume "default" "Master" (args ++ ("--":ext)) 10 capture = Volume "default" "Capture" ["-t", ""] 10 +batt0 p = + BatteryN ["BAT0"] + ["-t", "" + , "-S", "Off", "-d", "0", "-m", "3" + , "-L", "10", "-H", "90", "-p", "3" + , "--low", pHigh p, "--normal", pNormal p, "--high", pLow p + , "--" + , "-P" + , "-a", "notify-send -u critical 'Battery running out!!!!!!'" + , "-A", "7" + , "-i", "\9211" + , "-O", "\129707 " + , "-o", "๐Ÿ”‹" ++ " " + , "-H", "10", "-L", "7" + , "-h", pHigh p, "-l", pLow p] 50 "batt0" + weath st p = WeatherX st - [ ("", "") - , ("clear", "๐ŸŒฃ") - , ("sunny", fc (pHigh p) "๐ŸŒฃ") - , ("fair", "๐ŸŒฃ") + [ ("", "๐ŸŒก") + , ("clear", "๐Ÿ”†") + , ("sunny", "๐Ÿ”†") + , ("fair", "๐Ÿ”†") , ("mostly clear", "๐ŸŒค") , ("mostly sunny", "๐ŸŒค") , ("partly sunny", "โ›…") @@ -45,16 +60,18 @@ weath st p = , ("light snow", "๐ŸŒจ") , ("snow", "โ„") ] - (mkArgs p ["-t", " ยฐ " + (mkArgs p ["-t", " ยฐ ๐ŸŒซ " , "-L", "10", "-H", "25" , "-T", "25", "-E", ".."] ["-w", ""]) 18000 config p = (baseConfig p) { position = TopSize C 100 (defaultHeight - 2) + , textOutput = True + , textOutputFormat = Ansi , font = "xft:DejaVu Sans Mono-8" , commands = [ Run (topProcL p) - , Run (batt p) + , Run (batt0 p) , Run (cpu p) , Run (cpuFreq' p) , Run memory' @@ -76,7 +93,7 @@ config p = (baseConfig p) { ++ " |wg-mullvad||tun0||wlp164s0wi|" ++ " |dynnetwork| " ++ " |default:Master| ๐Ÿ—ช |default:Capture|" - ++ " |EGPH| " + ++ " |EGPH|" ++ "{*}" ++ "|kbd|" ++ " |cpufreq|" @@ -84,7 +101,7 @@ config p = (baseConfig p) { ++ " |multicoretemp|" ++ " |top| " ++ " โž |memory| " - ++ " |diskio| ๐Ÿ–ซ|disku| " -- ๐Ÿ“€ ๐Ÿ–ด + ++ " |diskio| ๐Ÿ–ด |disku| " -- ๐Ÿ“€ ๐Ÿ–ด ๐Ÿ–ซ ++ " |datetime| " ++ "|laTime| " } -- cgit v1.2.3