Arch Teapot Notes 12-02-18: Difference between revisions

From Chaosdorf Wiki
No edit summary
No edit summary
Line 3: Line 3:
We learned that multimedia keys are available by using ''showkey''. To use it, one has to go to a text terminal, start ''showkey'' and press the buttons in question.
We learned that multimedia keys are available by using ''showkey''. To use it, one has to go to a text terminal, start ''showkey'' and press the buttons in question.


The shown keycodes (example X201) should be placed in <tt>~/.Xmodmap</tt>
The shown keycodes should be placed in <tt>~/.Xmodmap</tt>
 
Example (ThinkPad X201):
<source lang="lua">
<source lang="lua">
keycode 234 = XF86Back
keycode 234 = XF86Back
keycode 233 = XF86Forwardpre
keycode 233 = XF86Forwardpre
keycode 144 = XF86AudioPrev
keycode 144 = XF86AudioPrev
keycode 164 = XF86AudioStop
keycode 164 = XF86AudioStop  
keycode 162 = XF86AudioPlay
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext
keycode 153 = XF86AudioNext
Line 16: Line 18:
</source>
</source>


These keysyms can be used for your favorite window manager‘s configuration.
Example (ThinkPad X61):
 
Example (awesome):
<source lang="lua">
  -- Multimedia Keys
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn('mpc -h localhost volume +1') end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn('mpc -h localhost volume -1') end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn('mpc -h localhost volume 0') end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn('mpc -h localhost next') end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn('mpc -h localhost prev') end),
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn('mpc -h localhost toggle') end)
</source>
 
 
== Multimedia Keys for X61 Thinkpads ==
<source lang="lua">
<source lang="lua">
keycode 113 = Volume Mute
keycode 113 = Volume Mute
Line 50: Line 38:
keycode 238 = WLAN (Fn+F5)
keycode 238 = WLAN (Fn+F5)
keycode 372 = Fn+Space
keycode 372 = Fn+Space
</source>
These keysyms can be used for your favorite window manager‘s configuration.
Example (awesome):
<source lang="lua">
  -- Multimedia Keys
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn('mpc -h localhost volume +1') end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn('mpc -h localhost volume -1') end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn('mpc -h localhost volume 0') end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn('mpc -h localhost next') end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn('mpc -h localhost prev') end),
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn('mpc -h localhost toggle') end)
</source>
</source>



Revision as of 18:37, 18 February 2012

Multimedia Keys

We learned that multimedia keys are available by using showkey. To use it, one has to go to a text terminal, start showkey and press the buttons in question.

The shown keycodes should be placed in ~/.Xmodmap

Example (ThinkPad X201):

keycode 234 = XF86Back
keycode 233 = XF86Forwardpre
keycode 144 = XF86AudioPrev
keycode 164 = XF86AudioStop 
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume

Example (ThinkPad X61):

keycode 113 = Volume Mute
keycode 114 = Volume Down
keycode 115 = Volume Up
keycode 143 = FnKey itsel
keycode 148 = ThinkVantage Button
keycode 152 = ScreenLock (Fn+F2)
keycode 163 = Media Next
keycode 164 = Media Play/Pause
keycode 165 = Media Previous
keycode 166 = Media Stop
keycode 191 = Trackpoint/Touchpad Switch (Fn+F8)
keycode 194 = Dock Eject (Fn+F9)
keycode 224 = Brightness Down
keycode 225 = Brightness Up
keycode 227 = Monitor (Fn+F7)
keycode 236 = Battery (Fn+F3)
keycode 238 = WLAN (Fn+F5)
keycode 372 = Fn+Space

These keysyms can be used for your favorite window manager‘s configuration.

Example (awesome):

  -- Multimedia Keys
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn('mpc -h localhost volume +1') end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn('mpc -h localhost volume -1') end),
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn('mpc -h localhost volume 0') end),
    awful.key({ }, "XF86AudioNext", function () awful.util.spawn('mpc -h localhost next') end),
    awful.key({ }, "XF86AudioPrev", function () awful.util.spawn('mpc -h localhost prev') end),
    awful.key({ }, "XF86AudioPlay", function () awful.util.spawn('mpc -h localhost toggle') end)

PulseAudio

PulseAudio is a sound system enabling us to control application volumes individually and use other computers soundcards over the network.

Recommended packages:

  • pulseaudio (the daemon, required)
  • pavucontrol (GTK based mixer application)
  • paprefs (GTK based configuration tool)

Note: in order to discover remote soundcards, one has to start avahi-daemon!