Fun with ion3
07 Oct 2009
Ion™ is a tiling tabbed window manager designed with keyboard users in mind.
In recent years I’ve been a GNOME / Compiz guy, but while I’ve enjoyed it’s tight integration with Ubuntu and flashy effects, I’ve always missed the simplicity of so-called minimalist window managers, mainly fvwm. These days, however, practically everything I do happens inside a Firefox, gvim, or gnome-terminal.
I want keyboard-driven. I want scriptable. And I don’t want windows hiding behind other windows. Ever.
Enter ion3. I’ve only been using it for the last 24 hours, and even though I haven’t memorized all of the keymaps, or learned how to code in Lua (yet!), I already love it. So far the only problem I’ve not been able to overcome is a bug in the latest Adobe Flash that breaks fullscreen video. This isn’t specific to ion3 – it’s a problem with any focus-follows-mouse system. I hear there is a workound, but it didn’t seem to work for me. I consider it a microscopic trade-off for such an efficient window manager. Many of my previously sluggish applications now run incredibly fast, and with a couple days of practice I’ll be working faster too.
Installation
$ sudo apt-get install ion3 ion3-dev ion3-scripts ion3-doc
Now just log out, choose ion3 and start a new session. The first time you log in you’ll be greeted with the man page, which I highly suggest reading. If you try not to “cheat” by using the mouse, you’ll pick up almost everything in a couple of hours, and from there you’ll find yourself navigating faster and faster until you don’t have to think about it at all. Just like vim.
Ion is both simple and well-documented, so it would be pointless for me to write introductory tutorial. Instead, here are a couple tricks I’ve discovered.
Modifying your configuration
One of the first things you’re going to want to do when you’re done messing around is change a few settings. For the most part, this is done in a file called cfg_ion.lua. Copy the system-wide file (I found mine at /etc/X11/ion3/cfg_ion.lua) to ~/.ion3/cfg_ion.lua and open it with a text editor.
$ mkdir ~/.ion3
$ cp `locate cfg_ion.lua | head -1` ~/.ion3/cfg_ion.lua
$ gvim ~/ion3/cfg_ion.lua
You’ll need to restart Ion for your changes to take effect. Don’t worry, all your applications will stay open; only the window manager needs to be restarted. Hit F12 and type session/restart.
I messed this file up a few times experimenting, and I’ll probably mess it up a few more. If you screw up this file like I did, your F12 shortcut can disappear, and you’ll need another way to restart Ion after you’ve fixed it. Keep a terminal open whenever you’re editing, because you may not be able to launch one. The trick to restart Ion from the console is simple:
$ ps -e | grep ion3 # 21108 ? 00:00:16 ion3
$ kill -USR1 21108
Remapping Mod1
The Mod1 key is used to initiate most interactions with Ion. On most systems, this is Alt. This is usually a very bad choice, because a lot of other applications need the Alt key for other things. I tried the Flying Window key, but it turns out it’s in a very uncomfortable place on the keyboard. The number keys are used a lot. Try reaching Win+6, and you’ll see what I mean. CapsLock has been working great for me, and as an added bonus, makes it much more work to shout on IRC.
Check your keymaps with xmodmap -pm. On my system, Mod3 was unused, so I remapped CapsLock to that.
Edit (or create) ~/.Xmodmaprc and insert these lines at the bottom…
remove Lock = Caps_Lock
add Mod3 = Caps_Lock
Then run it…
/usr/bin/X11/xmodmap ~/.Xmodmaprc
Also add this line to ~/.Xsession so it is run automatically whenever you start X.
If your xmodmap -pm now reads…
mod3 Caps_Lock (0x42)
then you’re in luck! Now you just need to edit the META variable near the top of your cfg_ion.lua to reflect the change
META="Mod3+"
and restart.
All done! I hope you enjoy learning and using Ion3 as much as I have. I don’t think I’ll be switching again any time soon.