openbox窗口管理器的常用设置
openbox是个轻量的窗口管理器,可以独立运行于KDE等桌面环境之外。在一些老旧机器上,可以获得最佳性能。
安装
sudo apt install openbox lightdm xterm tint2 fonts-wqy-microhei
配置
复制配置文件到本地用户
mkdir -p ~/.config
cp -r /etc/xdg/openbox ~/.config
配置自启程序
autostart
pcmanfm --desktop &
tint2 &
volumeicon &
fcitx &
#feh --bg-scale ~/debian/bg.png
添加退出注销菜单menu.xml
<menu id="exit-menu" label="Exit">
<item label="Log Out">
<action name="Execute">
<command>openbox --exit</command>
</action>
</item>
<item label="Shutdown">
<action name="Execute">
<command>systemctl poweroff</command>
</action>
</item>
<item label="Restart">
<action name="Execute">
<command>systemctl reboot</command>
</action>
</item>
<item label="Suspend">
<action name="Execute">
<command>systemctl suspend</command>
</action>
</item>
<item label="Hibernate">
<action name="Execute">
<command>systemctl hibernate</command>
</action>
</item>
</menu>
rc.xml添加dmenu,音量控制,截屏快捷键
<!--<keyboard>-->
<!-- Keybindings for running applications -->
<keybind key="A-r">
<action name="Execute">
<execute>dmenu_run</execute>
</action>
</keybind>
<keybind key="A-space">
<action name="Execute">
<execute>uxterm</execute>
</action>
</keybind>
<keybind key="A-Up">
<action name="Execute">
<command>amixer set Master 5%+</command>
</action>
</keybind>
<keybind key="A-Down">
<action name="Execute">
<command>amixer set Master 5%-</command>
</action>
</keybind>
<keybind key="A-m">
<action name="Execute">
<command>amixer set Master toggle</command>
</action>
</keybind>
<keybind key="Print">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Snapshot</name>
</startupnotify>
<command>scrot images.png</command>
</action>
</keybind>
<keybind key="S-Print">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Snapshot with Frame</name>
</startupnotify>
<command>scrot -bs images.png</command>
</action>
</keybind>
<keybind key="C-Print">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Snapshot Fullscreen</name>
</startupnotify>
<command>scrot -s images.png</command>
</action>
</keybind>
<!-- Treating OpenBox like a Tiling WindowManager -->
<keybind key="W-Left">
<action name="Unmaximize" />
<action name="MoveResizeTo">
<x>0</x>
<y>0</y>
<width>50%</width>
<height>100%</height>
</action>
</keybind>
<keybind key="W-Right">
<action name="Unmaximize" />
<action name="MoveResizeTo">
<x>-0</x>
<y>0</y>
<width>50%</width>
<height>100%</height>
</action>
</keybind>
<keybind key="W-Up">
<action name="Unmaximize" />
<action name="MoveResizeTo">
<x>0</x>
<y>0</y>
<width>100%</width>
<height>50%</height>
</action>
</keybind>
<keybind key="W-Down">
<action name="Unmaximize" />
<action name="MoveResizeTo">
<x>0</x>
<y>-0</y>
<width>100%</width>
<height>50%</height>
</action>
</keybind>
<!--</keyboard>-->