darcs patch: add-dynamic-bars-module
1 patch for repository http://code.haskell.org/XMonadContrib: Previous version submitted here: http://www.haskell.org/pipermail/xmonad/2012-March/012465.html Description copied here for completion's sake: The Xrandr calls requires X11 1.6.0 which also causes issues in other places in the code. I can submit these separately, but since this is not really an official submission, I'll leave them out so they don't distract from the meat of the patch. There is code from adamvo's xmonad.hs (getScreens and multiPP) as well. There are still bugs, but this is to help get some testing and other eyes looking at it. Specifically, not all of the bars work all the time. Currently to solve the issue, I just restart XMonad until they're all there. I'm not sure how to best ensure that things work. For launching the status bars, here are my implementations: myStatusBar :: DynamicStatusBar myStatusBar (S id) = do safeSpawn "xmobar" ["-x", idStr, "-C", "[ Run NamedXPropertyLog \"" ++ prop ++ "\" \"" ++ abbr ++ "\" ]"] spawnPipe $ "xmonadpropwrite " ++ prop where abbr = "_XMONAD_LOG" prop = "_XMONAD_LOG_" ++ idStr idStr = show id myStatusBarCleanup :: DynamicStatusBarCleanup myStatusBarCleanup = safeSpawn "killall" ["xmobar"] For this setup, a few other updates are required: My Xrandr additions to the X11 package: https://github.com/mathstuf/X11/tree/dev/xrandr-support The -C option for xmobar, available here (the next branch there uses X11's Xrandr support instead of the built-in stuff as well): https://github.com/mathstuf/xmobar/tree/dev/add-incremental-config-option My xmobarrc is: Config { font = "xft:Inconsolata:pixelsize=9" , border = NoBorder , borderColor = "black" , bgColor = "black" , fgColor = "grey" , position = TopW L 80 , lowerOnStart = True , commands = [ Run Weather "KALB" ["-t","A: <tempC>°C","-L","15","-H","30","--normal","green","--high","red","--low","lightblue"] 36000 , Run MultiCpu ["-S","true","-t","<autototal>","-L","3","-H","40","--low","green","--normal","yellow","--high","red"] 25 , Run Memory ["-S","true","-t","<usedratio>","-L","20","-H","40","--low","green","--normal","yellow","--high","red"] 25 , Run Battery ["-S","true","-t","<left>","-L","30","-H","75","--high","green","--normal","yellow","--low", "red"] 100 , Run Date "%a %b %_d" "date" 36000 , Run Date "%H:%M" "time" 100 , Run Mail [ ("k","~/.local/share/mail/kitware/INBOX") , ("g","~/.local/share/mail/gmail/INBOX") , ("b","~/.local/share/mail/brewhouse/INBOX") ] "Mail" ] , sepChar = "%" , alignSep = "}{" , template = "%_XMONAD_LOG% }{ %multicpu% | %memory% | %battery% | %Mail% | %KALB% | <fc=#ee9a00>%date%</fc> <fc=skyblue>%time%</fc>" } Thu Mar 15 20:22:04 EDT 2012 Ben Boeckel <mathstuf@gmail.com> * add-dynamic-bars-module This adds the X.H.DynamicBars module. It allows per-screen status bars to be easily managed and dynamically handles the number of screens changing.
participants (1)
-
Ben Boeckel