import Xmobar import Config import Monitors topProcL p = TopProc (p <~> args) 15 where template = " ยท " args = ["-t", template, "-w", "12", "-L" , "10", "-H", "80"] diskIOS p = DiskIO [("/", " ")] (diskArgs p) 10 cpuFreq' p = CpuFreq (p <~> args) 50 where args = ["-t" , "" , "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"] memory' = Memory args 20 where template = " " args = ["-t", template , "-p", "2", "-d", "1", "--", "--scale", "1024"] master p = Volume "default" "Master" (args ++ ("--":ext)) 10 where args = ["-t", " "] ext = ["-C", pForeground p, "-c", "sienna4", "-O", "๐Ÿ”Š", "-o", "๐Ÿ”‡"] capture = Volume "default" "Capture" ["-t", ""] 10 batt0 p = BatteryN ["BAT0"] ["-t", "" , "-S", "Off", "-d", "0" -- , "-m", "2" , "-L", "10", "-H", "90" -- , "-p", "2" , "--low", pHigh p, "--normal", pNormal p, "--high", pLow p , "-W", "0" , "-f", "\129707\129707\129707๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹โœณ๏ธ" , "--" , "-P" , "-a", "notify-send -u critical 'Battery running out!!!!!!'" , "-A", "7" , "-i", "๏ผŠ" -- "โœณ๏ธ" , "-o", "\129707 " , "-O", "๐Ÿ”‹" ++ " " -- , "-o", " " --, "-O", " " , "-H", "10", "-L", "7" , "-h", pHigh p, "-l", pLow p] 50 "batt0" weath st p = WeatherX st [ ("", "๐ŸŒก") , ("clear", "๐Ÿ”†") , ("sunny", "๐Ÿ”†") , ("fair", "๐Ÿ”†") , ("mostly clear", "๐ŸŒค๏ธ") , ("mostly sunny", "๐ŸŒค๏ธ") , ("partly sunny", "โ›…") , ("obscured", "๐ŸŒ") , ("fog", "๐ŸŒซ๏ธ") , ("foggy", "๐ŸŒซ๏ธ") , ("cloudy", "โ˜๏ธ") , ("overcast", "โ˜๏ธ") , ("partly cloudy", "โ›…") , ("mostly cloudy", "โ˜๏ธ") , ("considerable cloudiness", "โ˜๏ธ") , ("light rain", "๐ŸŒฆ๏ธ") , ("rain", "๐ŸŒจ๏ธ") , ("ice crystals", "โ„๏ธ") , ("light snow", "๐ŸŒจ๏ธ") , ("snow", "โ„๏ธ") ] (mkArgs p ["-t", " ยฐ ๐ŸŒซ " , "-L", "10", "-H", "25" , "-T", "25", "-E", ".."] ["-w", ""]) 18000 config p = (baseConfig p) { position = TopSize C 100 22 , textOutput = True , font = "Hack 10" , commands = [ Run (topProcL p) , Run (batt0 p) , Run (cpu p) , Run (cpuFreq' p) , Run memory' , Run (diskU p) , Run (diskIOS p) , Run (kbd p) , Run (coreTemp p) , Run (wireless p "wlan0") , Run (dynNetwork p) , Run (vpnMark "wg-mullvad") , Run tun0 , Run (master p) , Run capture , Run laTime , Run localTime , Run (weath "EGPH" p) , Run (NamedXPropertyLog "_EMACS_LOG" "elog") ] , template = " |batt0| " ++ " ๐Ÿ–ง |wg-mullvad||tun0||wlan0wi|" -- ++ " |wg-mullvad||tun0||wlan0wi|" ++ " |dynnetwork| " ++ " |default:Master| ๐ŸŽ™๏ธ |default:Capture|" ++ " |EGPH|" ++ " |elog|" ++ "{*}" ++ "|kbd|" ++ " |cpufreq|" ++ " |multicpu|" ++ " |multicoretemp|" ++ " |top| " ++ " โž |memory| " ++ " |diskio| ๐Ÿ–ด |disku| " ++ " |datetime| " ++ "|laTime| " } main :: IO () main = palette >>= configFromArgs . config >>= xmobar