Openbox介绍
Openbox 是运行于搭载X11的GNU/Linux上的轻巧窗口管理器,Openbox 以GPL协议方式开放源代码,是免费自由软件。Openbox基于Blackbox,后者被认为原始窗口管理器之一(即代码自有)。
Key-Binding(按键绑定)
可以通过在rc.xml(具体为止通常在.config/openbox/xxx-rc.xml中,需根据各自系统而定)
Key-combination 组合按键
组合按键规则:Modifiers-Modifiers-Key
Modifiers(修饰符关键字)-缩写
Modifier keys | 含义 |
---|---|
S | Shift key |
C | Control key |
A | Alt key |
W | Super key (Usually bound to the Windows key on keyboards which have one) (WINDOWS电脑中的系统键) |
M | Meta key |
H | Hyper key (If it is bound to something) |
Keys(按键关键字)
The Key is the name of the key, such as "a", "space", "Escape", "less", or "F1". You can find the name of any key by using the
xev
command in a terminal, pressing the desired key, and watching the output fromxev
in the terminal. For example, the followingxev
output indicates, on the third line, that the Menu key was pressed.
可以通过xev软件获得键盘按键的字符或数字值,然后在组合中使用,譬如按键d:
KeyRelease event, serial 48, synthetic NO, window 0x1800001,
root 0x17b, subw 0x0, time 3861563, (74,127), root:(75,155),
state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
可以使用字母:
<keyboard>
...
<keybind key="d">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
...
</keyboard>
也可以使用数字值:
<keyboard>
...
<keybind key="40">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
...
</keyboard>
Actions(动作)
可在http://openbox.org/wiki/Help:Actions 文档中查询所有动作功能。
譬如常见配置:
<keybind key="A-Tab">
<action name="NextWindow" />
</keybind>
<keybind key="W-D">
<action name="ToggleShowDesktop" />
</keybind>
A-Tabl(Alt+Tab)切换窗口显示;
W-D(Windows+D)切换桌面显示(显示桌面/隐藏桌面)
还可以通过Execute执行一些系统脚本或软件:
<keybind key="W-t">
<action name="Execute">
<command>urxvt</command>
</action>
</keybind>
本文仅作简单介绍,详细配置可参考官方链接。