我知道XMobar支持位圖圖標,我可以配置這些圖標。不過,我也想使用圖標來表示當前的XMonad佈局,但XMobar從XMonad獲取stdin
。而我無法找出傳遞位圖圖標而不是常規符號的方法。用於指示XMobar(XMobad)中佈局的圖標
那麼如何通過圖標而不是符號來指示XMobar中的XMonad佈局?
我相對的佈局配置的當前部分:
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)
where
isSkype = (Title "zoresvit - Skype™")
isPidgin = (Title "Buddy List")
fullLayout = renamed [Replace "F"] $ avoidStruts $ noBorders $ (Full)
myLayouts = onWorkspace "η" chatLayout $ defaultLayouts
main = do
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 = do
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