[英]XMonad startup on different workspaces
I want to startup some applications in different workspaces(it is important) on xmonad start.我想在 xmonad 启动时在不同的工作区中启动一些应用程序(这很重要)。 So, I wrote following
startupHook
:所以,我写了以下
startupHook
:
startupApps :: [String]
startupApps = ["konsole", "emacs", "firefox", "gvim", "konsole"]
startupSpawn :: X ()
startupSpawn = zipWithM_ id (map (spawnOn . show) [1..]) startupApps
But, it spawns all apps in first workspace.但是,它会在第一个工作区中生成所有应用程序。 It seems to be part of more general problem -- if I start application, it get workspace not when it actually started, but when it loaded.
这似乎是更普遍问题的一部分——如果我启动应用程序,它会在实际启动时而不是在加载时获得工作区。 So, if I start firefox on WS1, then switch to WS2, firefox will spawn on WS2.
所以,如果我在 WS1 上启动 firefox,然后切换到 WS2,firefox 将在 WS2 上产生。
Still, what can I do about my intention?尽管如此,我能对我的意图做些什么?
You can use the manageHook
to tell xmonad to move certain applications to certain desktops.您可以使用
manageHook
告诉 xmonad 将某些应用程序移动到某些桌面。
myManageHook = composeAll . concat $ [
[ className =? "Firefox" --> doF (shiftToWs 2) ]
, [ className =? "gvim" --> doF (shiftToWs 3) ]
-- and so on
]
The className
s might vary, though.不过,
className
可能会有所不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.