Geek Tip: Volume Controls in wmii

wmii is awesome. wmii will change your life. wmii will change the way you think about working with a computer. It will help you stay focused, it will teach you more about how your computer works, and encourage you to solve problems on a scientific level, rather than a “maybe if I do this it will make the magical elves in my computer do what I want them to” level. It will make the time you spend on your computer more enjoyable, less cluttered, and more efficient. At least, it has done all these things for me. wmii is a window manager (layman’s terms: a desktop) that is minimal, functional, and efficient. It’s one step above the terminal, and doesn’t provide anything you don’t really need. But the fact that it’s highly customizable, keyboard controlled, and very efficient makes it ideal for computer geeks like me. One thing I’ve been pondering about lately, is how to make the volume keys on my keyboard work. I figured there would be an easy solution, and there is.

First, if your keyboard has dedicated volume keys, then they’re called “XF86AudioRaiseVolume” and “XF86AudioLowerVolume” unless something has gone wrong. More generally, to figure out what wmii (and other X11 applications) call the keys you want, run xev from the terminal, press the key in question, and look for the line that says (keysym 0xsomething, Something). In this case, the Something is the name of your key. Next, edit your wmiirc (usually in ~/.wmii-3.5/wmiirc, or you’ll have to copy it there from /etc/X11/wmii-3.5/wmiirc,) and find the section that starts with #Key Bindings. You’ll see a few lines that have the syntax

Key Something


You should enter your keys in exactly that format. For the volume keys, I wrote this:

Key XF86AudioRaiseVolume

amixer -c 0 set Master 2%+

Key XF86AudioLowerVolume

amixer -c 0 set Master 2%-

Press Mod-a and select wmiirc to reset wmii’s configuration file. Done. Enjoy your volume keys.

Tip: you can also use wmiirc to – besides changing just about anything related to wmii’s functionality – change your desktop background to something that isn’t just gray. Install feh (not necessary, but it makes things easy,) comment out the line in wmiirc that starts with “xsetroot “, and add “feh –bg-scale /path/to/background/image &” Done.


2 thoughts on “Geek Tip: Volume Controls in wmii

Leave a Reply

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

You are commenting using your account. Log Out / Change )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s