xmonadxmobar

xmobar stuck on Updating


So I just installed xmobar for the first time and I did some hacking on it with help of documentation and some YouTube videos. When I reload the xmonad wm i get the xmobar bar but it's stuck on Updating... I'll provide the config file. Thanks in advance!

Config
{ --APPERANCE

  --FONTS
  font = "xft=Ubuntu:weight=bold:pixelsize=12:antialias=true:hinting:true",
  --COLORS
  bgColor = "#282c34",
  fgColor = "#ff6c6b",
  --BAR POSITION
  position = Top,
  commands =
  [ --Get kernel version
    Run Com ".local/bin/kernel" [] "kernel" 3600,
    --CPU Usage
    Run Cpu ["-t", "<fn=2>\xf108</fn>  cpu: (<total>%)", "-H", "50", "--high", "red"] 20,
    --RAM Usage
    Run Memory ["-t", "<fn=2>\xf233</fn>  mem: <used>M (<usedratio>%)"] 20,
    --Free Disk Space
    Run DiskU [("/", "<fn=2>\xf0c7</fn>  hdd: <free> free")] [] 60,
    --Uptime
    Run Uptime ["-t", "uptime: <days>d <hours>h"] 360,
    --Battery
    Run BatteryP ["BAT0"] ["-t", "<acstatus><watts> (<left>%)"] 360,
    --Date & Time
    Run Date "<fn=2>\xf017</fn>  %b %d %Y - (%H:%M) " "date" 50,
    --Weather
    Run Weather "RJTT" ["--template", "<skyCondition> | <fc=#4682B4><tempC></fc>°C | <fc=#4682B4><rh></fc>% | <fc=#4682B4><pressure></fc>hPa"] 36000,
    --Network Activity Monitor
    Run DynNetwork
          [ "--template",
            "<dev>: <tx>kB/s|<rx>kB/s",
            "--Low",
            "1000", -- units: B/s
            "--High",
            "5000", -- units: B/s
            "--low",
            "darkgreen",
            "--normal",
            "darkorange",
            "--high",
            "darkred"
          ]
          10,
          -- Script that dynamically adjusts xmobar padding depending on number of trayer icons
          Run Com ".config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
    ]
}

Solution

  • You did not specify a top-level template in the configuration. When missing, it defaults to "%StdinReader% }{ <fc=#00FF00>%uname%</fc> * <fc=#FF0000>%theDate%</fc>". Which of these three items is still Updating...?

    If it's StdinReader (which is most likely) and assuming you want data logged by XMonad to be displayed (i.e. not just the "external" items you have defined), check if the output of your XMonad instance is properly piped into xmobar. This may be either set in your .xsession (or similar) file, or from within XMonad using spawnPipe and hPutStrLn (from the XMonad.Util.Run module from the xmonad-contrib package).

    For the latter, you would typically also import XMonad.Hooks.DynamicLog (also from the xmonad-contrib package) and for your logHook redefine the ppOutput field of your preferred pretty-printer (presumably xmobarPP) to direct its output to an instance of xmobar. Your xmonad.hs would then look something like this:

    import XMonad.Util.Run -- for spawnPipe and hPutStrLn
    import XMonad.Hooks.DynamicLog -- for dynamicLogWithPP, pp*, xmobar*
    ...
    main = do
      ...
      barpipe <- spawnPipe "xmobar -with -your -preferred -options"
      ...
      xmonad $ def {
        ...
        logHook = dynamicLogWithPP $ xmobarPP {
          ...
          ppOutput = hPutStrLn barpipe
          ...
        }
        ...
      }
    

    Regarding the rest of your xmobar configuration: