openbox shortcut keybind and menu settings

1. keybind

find the file ~/.config/openbox/rc.xml

in the node <keybind>, add below code:

    <keybind key="W-t">
      <action name="Execute">
        <command>x-terminal-emulator</command>
      </action>
    </keybind>
    <keybind key="W-r">
      <action name="Execute">
        <command>x-www-browser</command>
      </action>
    </keybind>
    <keybind key="W-e">
      <action name="Execute">
        <command>emacs</command>
      </action>
    </keybind>

    <!--
	volume control: install ALSA amixer to control the volume.
	run command: sudo apt-get install alsa-base	
    -->
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
	<command>amixer set Master 5%+ unmute</command>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
	<command>amixer set Master 5%- unmute</command>
      </action>
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute">
	<command>amixer set Master toggle</command>
      </action>
    </keybind>


2.menu

you can use the default menu, or add menu.xml in directory ~/.config/openbox/ and add you menu.

Here is my menu.xml


<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" 
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	      xsi:schemaLocation="http://openbox.org/                 
				  file:///usr/share/openbox/menu.xsd">

  <menu id="root-menu" label="Openbox">
    <item label="Terminal">
      <action name="Execute">
	<command>x-terminal-emulator</command>  
      </action>
    </item>
    <item label="WebBrowser">
      <action name="Execute">  
	<command>x-www-browser</command>  
      </action>  
    </item>
    <item label="Emacs">
      <action name="Execute">  
	<command>emacs</command>  
      </action>  
    </item>

    <separator/>
    <menu id="application" label="Application">
      <item label="PDFViewer">
	<action name="Execute">  
	  <command>evince</command>  
	</action>  
      </item>
      <item label="Dia">
	<action name="Execute">  
	  <command>dia</command>  
	</action>  
      </item>
      <item label="ImageViewer">
	<action name="Execute">  
	  <command>gpicview</command>  
	</action>  
      </item>
    </menu>
    <separator/>

    <item label="Reconfigure">
      <action name="Reconfigure"/>
    </item>
    <item label="Restart">
      <action name="Restart"/>
    </item>
    <item label='obconf' >
      <action name='Execute'><execute>obconf</execute></action>
    </item>
    <item label="Exit">
      <action name="Exit"/>
    </item>

  </menu>
</openbox_menu>



   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值