由于某种原因,我的 xmonad 配置不会启动 xmobar,但它不会引发任何错误,并且该命令可以xmobar
正常启动它。这是我的xmobar.hs
import XMonad
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.DynamicLog
import XMonad.Util.Run(spawnPipe)
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ terminal = "terminator"
, layoutHook = avoidStruts $ layoutHook defaultConfig
, manageHook=manageHook defaultConfig <+> manageDocks
, logHook = dynamicLogWithPP $ sjanssenPP { ppOrder = reverse }
, borderWidth = 1
}
答案1
它会立即关闭,因为您没有向其发送任何内容。您需要指定漂亮打印的输出:
dynamicLogWithPP $ sjanssenPP {ppOutput = hPutStrLn xmproc},