This question has an appropriate answer, but it's hiding everything I found difficult inside "spawn xmobar" comment.
- How to spawn one instance of xmobar for different screens?
- If this is not an option, how to spawn multiple instances on multiple screens?
- How to setup logHook with multiple instances of xmobar?
Asked
Active
Viewed 2,121 times
1

biskulopty
- 13
- 3
1 Answers
6
e.g. something like this:
import XMonad
import XMonad.Util.Run
import XMonad.Layout.IndependentScreens
main = do
n <- countScreens
xmprocs <- mapM (\i -> spawnPipe $ "xmobar /home/biskulopty/.xmobarrc-" ++ show i ++ " -x " ++ show i) [0..n-1]
xmonad def {
logHook = {- use xmprocs, which is a list of pipes of type [Handle] -}
}

Daniel Wagner
- 145,880
- 9
- 220
- 380
-
1Great, I got it working like this: `mapM_ (\handle -> dynamicLogWithPP $ defaultPP { ppOutput = System.IO.hPutStrLn handle }) xmprocs ` – biskulopty Jun 16 '18 at 12:31