Ross Wan's World!

Python, Ajax, PHP and Linux.

Openbox:音量控制

Posted by Ross Wan 于 2008/06/12

       要在 Openbox 下方便的控制音量,可以使用 Openbox 键绑定。例如,我将 PCM 音量绑定到组合键── win 键 + 小键盘的 “0”、“+”和“-” 健上。rc.xml 的具体配置如下:

<keybind key=”W-KP_0″>
      <action name=”Execute”>
        <command>amixer -q set Master 100%-</command>
      </action>
</keybind>
<keybind key=”W-KP_Subtract”>
      <action name=”Execute”>
        <command>amixer -q set Master 5%-</command>
      </action>
</keybind>
<keybind key=”W-KP_Add”>
      <action name=”Execute”>
        <command>amixer -q set Master unmute 5%+</command>
      </action>
</keybind>

       或者,可以绑定到鼠标的滚轮上:

<context name=”Desktop”>

      <mousebind button=”W-Up” action=”Click”>
        <action name=”Execute”>
          <command>amixer -q set Master unmute 5%+</command>
        </action>
      </mousebind>
      <mousebind button=”W-Down” action=”Click”>
        <action name=”Execute”>
          <command>amixer -q set Master 5%-</command>
        </action>
      </mousebind>

</context>

<context name=”Frame”>

      <mousebind button=”W-Up” action=”Click”>
        <action name=”Execute”>
          <command>amixer -q set Master unmute 5%+</command>
        </action>
      </mousebind>
      <mousebind button=”W-Down” action=”Click”>
        <action name=”Execute”>
          <command>amixer -q set Master 5%-</command>

</context>

Advertisements

一条回应 to “Openbox:音量控制”

  1. amoblin said

    试试这个超精简的 gvtray(written in python, depend with python-alsamixer)

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

 
%d 博主赞过: