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 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 weath st p = WeatherX st [ ("", "") , ("clear", "๐ŸŒฃ") , ("sunny", fc (pHigh p) "๐ŸŒฃ") , ("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 (defaultHeight - 2) , font = "xft:DejaVu Sans Mono-8" , commands = [ Run (topProcL p) , Run (batt p) , Run (cpu p) , Run (cpuFreq' p) , Run memory' , Run (diskU p) , Run (diskIOS p) , Run (kbd p) , Run (coreTemp p) , Run (wireless p "wlp164s0") , Run (dynNetwork p) , Run (vpnMark "wg-mullvad") , Run tun0 , Run (master p) , Run capture , Run laTime , Run localTime , Run (weath "EGPH" p) ] , template = "|batt0| " ++ " |wg-mullvad||tun0||wlp164s0wi|" ++ " |dynnetwork| " ++ " |default:Master| ๐Ÿ—ช |default:Capture|" ++ " |EGPH| " ++ "{*}" ++ "|kbd|" ++ " |cpufreq|" ++ " |multicpu|" ++ " |multicoretemp|" ++ " |top| " ++ " โž |memory| " ++ " |diskio| ๐Ÿ–ซ|disku| " -- ๐Ÿ“€ ๐Ÿ–ด ++ " |datetime| " ++ "|laTime| " } main :: IO () main = palette >>= configFromArgs . config >>= xmobar