您可以使用xmobar
來實現此目的,如果配置正確,它會顯示當前工作區和所有打開窗口或工作區的工作區。
是這樣的:
這是它的配置:
xmonad.hs
:
main = do
xmproc <- spawnPipe "/usr/bin/xmobar /home/svoelkl/.xmobarrc"
status <- spawnPipe myDzenStatus
conky <- spawnPipe myDzenConky
xmonad $ defaultConfig
{ manageHook = manageSpawn <+> myManageHook <+> manageDocks,
layoutHook = myLayout,
logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc,
ppLayout = (\ x -> ""),
ppTitle = xmobarColor "#b2ed00" ""
} >> updatePointer (Relative 0.99 0.99),
modMask = mod4Mask,
borderWidth = 4,
normalBorderColor = "#777777",
focusedBorderColor = "#ccff00",
workspaces = myWorkspaces,
focusFollowsMouse = True,
terminal = "x-terminal-emulator"
}
`removeKeys` myRemoveKeys
`additionalKeys` myAdditionalKeys
.xmobarrc
:
Config { position = TopSize L 90 24
, lowerOnStart = True
, bgColor = "black"
, fgColor = "grey"
, commands = [ Run Date "%a %_d %l:%M" "date" 10
, Run StdinReader
, Run BatteryP ["BAT0"]
["-t", "<acstatus><watts> (<left>%)",
"-L", "10", "-H", "80", "-p", "3",
"--", "-O", "<fc=#b2ed00>On</fc> -", "-o", "",
"-L", "-15", "-H", "-5",
"-l", "red", "-m", "blue", "-h", "green"]
600
]
, template = "%StdinReader% }{ %battery% <fc=#ee9a00>%date%</fc>"
}
你可能會喜歡['goToSelected'] http://hackage.haskell.org/package/xmonad-contrib-0.12/docs/XMonad-Actions-GridSelect.html #v:goToSelected),它將顯示一個窗口標題的網格。使用箭頭鍵導航網格,然後選擇一個窗口跳轉到該窗口的工作區。這看起來是一個起點嗎? –