Monday, 15 August 2011

Icons for indicating layouts in XMobar (XMonad) -



Icons for indicating layouts in XMobar (XMonad) -

i know xmobar supports bitmap icons , able configure those. want utilize icons indicating current xmonad layout, xmobar gets on stdin xmonad. , couldn't figure out way pass bitmap icons instead of regular symbols.

so how 1 pass icons instead of symbols indicating xmonad layout in xmobar?

my current part of config relative layouts:

defaultlayouts = smartborders(avoidstruts( renamed [replace "r"] (resizabletall 1 (3/100) (1/2) []) ||| renamed [replace "r!"] (mirror (resizabletall 1 (3/100) (1/2) [])) ||| renamed [replace "f"] (noborders full) ||| renamed [replace "#"] (grid) ||| renamed [replace "3c"] (threecolmid 1 (3/100) (3/4)) ||| renamed [replace "o"] (circle))) chatlayout = renamed [replace "chat"] $ avoidstruts $ withim (0.2) ispidgin $ reflecthoriz $ withim (0.2) isskype (grid) isskype = (title "zoresvit - skype™") ispidgin = (title "buddy list") fulllayout = renamed [replace "f"] $ avoidstruts $ noborders $ (full) mylayouts = onworkspace "η" chatlayout $ defaultlayouts main = xmproc <- spawnpipe "xmobar ~/.xmobarrc" xmonad $ withurgencyhook nourgencyhook $ defaultconfig { borderwidth = myborderwidth , focusedbordercolor = myfocusedbordercolor , handleeventhook = fullscreeneventhook , layouthook = mylayouts , managehook = managehook defaultconfig <+> composeall mymanagementhooks <+> managedocks , modmask = mymodmask , normalbordercolor = mynormalbordercolor , startuphook = spawn "~/.xmonad/startup_hook.sh" , terminal = myterminal , workspaces = myworkspaces , loghook = dynamiclogwithpp $ xmobarpp { ppoutput = hputstrln xmproc , ppcurrent = xmobarcolor solarizedgreen "" . wrap mycurrentwsleft mycurrentwsright , pphidden = xmobarcolor solarizedbase0 "" , pphiddennowindows = xmobarcolor solarizedbase02 "" , pplayout = xmobarcolor solarizedcyan "" , pptitle = xmobarcolor solarizedbase1 "" . shorten mytitlelength , ppurgent = xmobarcolor solarizedred "" . wrap myurgentwsleft myurgentwsright , ppvisible = xmobarcolor solarizedbase01 "" . wrap myvisiblewsleft myvisiblewsright } } `additionalkeys` mykeybindings

just add together xmonad.hs:

import xmonad.layout.named mylayout = named "<icon=/home/foo/bar/icon.xpm/>" $ resizabletall 1 (3/100) (1/2) []

xmonad xmobar

No comments:

Post a Comment