Sayed Khader | 23 Apr 2011 08:50
Gravatar

xmobar inconsistency

Hello,


I am writing because of some strange behavior I've observed after recently altering my xmobar configuration. Previously I had a single 'Run Com' directive that was invoking a shell script which checked the number of unread messages in my inbox. I added two more such invocations for another account and since then my cpu line has been echoing '<total not found!>'. Is there any way for me to have a single script return three values and parse the output in my xmobarrc? Can any of you think of any other work-arounds?

Below is my xmobar and xmonad configuration. Thanks in advance

.xmobarrc

Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
       , bgColor = "black"
       , fgColor = "#a4d9ed"
       , position = BottomW L 99
       , lowerOnStart = True
       , commands = [ Run Weather "WELL" ["-t"," <tempF>F","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"] 36000
       , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
       , Run Memory ["-t","Mem: <usedratio>%"] 10
       , Run Date "%a %b %_d %l:%M" "date" 10
       , Run Com "sh" ["/home/askhader/.xmonad/gmail.sh"] "yayo23" 30
       , Run Com "sh" ["/home/askhader/.xmonad/sy.sh"] "sy" 25
       , Run Com "sh" ["/home/askhader/.xmonad/sayed.sh"] "sayed" 35
       , Run StdinReader
       ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%StdinReader% }{ sy: [<fc=#00FFCC>%sy%</fc>] | sayed: [<fc=#EE1289>%sayed%</fc>] yayo23: [<fc=#BFFF00>%yayo23%</fc>]  <fc=red>%date%</fc>  %cpu% | %memory% "

       }

xmonad.hs

import XMonad
import qualified Data.Map as M
import XMonad.Actions.GridSelect
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks

main=do
    xmproc <- spawnPipe "/usr/bin/xmobar $HOME/.xmobarrc"
    xmonad $ defaultConfig
      { manageHook  = manageDocks <+> manageHook defaultConfig
      , layoutHook  = avoidStruts $ layoutHook defaultConfig
      , terminal    = "urxvt"
      , borderWidth = 1
      , logHook = dynamicLogWithPP $xmobarPP
                      { ppOutput = hPutStrLn xmproc
                      , ppTitle = xmobarColor "red" "" . shorten 90
                      }
      , modMask     = mod4Mask
     }  `additionalKeys`
     [ ((mod4Mask .|. shiftMask, xK_g), spawn "google-chrome")
     , ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
     , ((mod4Mask .|. shiftMask, xK_l), spawn "gnome-screensaver-command --activate")
     , ((mod4Mask .|. shiftMask, xK_s), goToSelected defaultGSConfig)
     , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
     , ((0, xK_Print), spawn "scrot")
     ]

_______________________________________________
Xmobar mailing list
Xmobar@...
http://projects.haskell.org/cgi-bin/mailman/listinfo/xmobar

Gmane