如何在xmonad中拥有9个以上的工作区? [英] How can I have more than 9 workspaces in xmonad?
问题描述
我可以更改工作空间的名称,大概只是通过更改此常量即可添加更多内容:
I can change the names of workspaces, and presumably simply add more by changing this conststant:
myWorkspaces = ["1","2","3⌂","4","5","6","7✉","8☺","9♫"]
如果我将某些东西添加到数组中,将会有更多的工作空间,但是如何对它们进行键绑定? Mod-1到Mod-9是默认设置,但是我找不到有关如何更改默认设置的文档.
If I add something to the array, there will be more workspaces, but how do I keybind them? Mod-1 through Mod-9 are the default but I can't find documentation for how to change that default.
推荐答案
I found the answer buried in this example configuration and together with the key names list, it looks like the following:
定义第十个工作区:
myExtraWorkspaces = [(xK_0, "0"),(xK_minus, "tmp"),(xK_equal, "swap")]
myWorkspaces = ["1","2","3⌂","4","5","6","7✉","8☺","9♫"] ++ (map snd myExtraWorkspaces)
然后,键绑定如下所示:
Then the key binding looks like this:
myKeys =
[ -- ... some more keys ...
] ++ [
((myModMask, key), (windows $ W.greedyView ws))
| (key,ws) <- myExtraWorkspaces
] ++ [
((myModMask .|. shiftMask, key), (windows $ W.shift ws))
| (key,ws) <- myExtraWorkspaces
]
在此示例中,使用了斜杠键,但是可以替代使用上面列表中的任何其他键.
In this example the slash key is used, but any other key from the list above can be used instead.
最后:
main = do
xmonad $ config {
workspaces = myWorkspaces
} `additionalKeys` (myKeys)
这篇关于如何在xmonad中拥有9个以上的工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!