![Xmonad:某些应用程序无法在我在配置中定义的工作区中启动](https://linux22.com/image/33563/Xmonad%EF%BC%9A%E6%9F%90%E4%BA%9B%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%97%A0%E6%B3%95%E5%9C%A8%E6%88%91%E5%9C%A8%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%AE%9A%E4%B9%89%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8C%BA%E4%B8%AD%E5%90%AF%E5%8A%A8.png)
这是我的 xmonad 配置的一部分~/.xmonad/xmonad.hs
myWorkspaces :: [String]
myWorkspaces = clickable . (map dzenEscape) $ ["web","doc","ssh","devel","chat","temp"]
where clickable l = [ "^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" |
(i,ws) <- zip [1..] l,
let n = i ]
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Vlc" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "skype" --> doF (W.shift (myWorkspaces !! 4))
, className =? "Mail" --> doF (W.shift (myWorkspaces !! 4))
-- , className =? "XCalc" --> doFloat
, className =? "Firefox" --> doF (W.shift (myWorkspaces !! 0)) -- send to ws 0
-- , className =? "Nautilus" --> doF (W.shift (myWorkspaces !! 5)) -- send to ws 5
, className =? "gvim" --> doF (W.shift (myWorkspaces !! 1)) -- send to ws 1
-- , className =? "Terminal" --> doF (W.shift (myWorkspaces !! 3)) -- send to ws 3
, className =? "Gimp" --> doF (W.shift (myWorkspaces !! 1)) -- send to ws 1
, className =? "Codeblocks" --> doF (W.shift (myWorkspaces !! 3)) -- send to ws 3
, className =? "stalonetray" --> doIgnore
]
问题是,Firefox 或 Codeblocks 在我想要的工作空间中启动,但 Skype 和邮件 (Thunderbird) 不尊重这些设置,并且始终在活动工作空间中启动。
答案1
确保 Skype 是大写的。我使用className =? "Skype" --> doShift "8"
并且有效,但如果我将 Skype 保留为小写,则无效。我不使用 Thunderbird,但也许这也是一个类名问题。看来您应该使用“Thunderbird-bin”。