You are here: Home>Cenkes>BlogPost>ALongWayHome (19 Nov 2007, Main.AndrewPantyukhin)EditAttach
Tags:
create new tag
, view all tags

A Long Way Home

18 Sep 2007 - 00:21:04 by in General

For the last two weeks I have walked many miles down the roads of usability and work flows. It started as a desperate move from Gmail to a suite of Open Source solutions. Then a general review of my routine. Now I use a single URxvt window with screen(1) in it on my main display. Big Liberation Mono font of size 18 goes much easier on my eyes than good old 9x15. I would prefer a non-xft solution (Freetype is quite slow), but for now I'm enjoying the full beauty of a Unicode-enabled system.

The inspiration for the one-window work flow came to me from a 2002 Freshmeat article by Jeff Covey. The rationale is that with the popular layout of 3-4 terminal windows per physical screen, you're constantly focusing on only a fraction of your display. There's no real benefit to having the other windows on the surface. I could argue that turning me eyeballs to the next window is 10 times faster than any hot key combination I could possibly learn, but who said I need to switch my attention often enough for that to be a problem? Actually, most of us know that frequent context switches are detrimental to performance.

I could also argue that having several important terminals on screen, I could use my side vision to spot activity (or lack thereof) in adjacent windows. But I get the same functionality in screen(1)'s status lines, which only takes up the bottom 1 of 27 rows my URxvt offers.

Speaking of URxvt, I still have to figure out how to use italic fonts through screen(1). I'm slowly getting through the intimidating jungles of terminal emulation, which includes but is not limited to termcap and terminfo. One of the problems I had is the conflict of Alt+0 (pressed simultaneously) and Esc-0 (one after another). The problem is, when you press Alt+0 URxvt has to send something to whatever is running inside of it, be it screen(1), zsh(1) or something else. URxvt can be configured to either send Esc-0, or send the character code of "0" with the high bit of the byte set. The latter way conflicts with many non-ASCII charsets. The problem with the former method is that I actually want Alt+0 and Esc-0 to mean two different things.

I use Alt+=number= to switch between the first ten screen(1) windows (and Alt+Shift+=number= to select windows 10-19). But in Vim, you type Esc-0 quite often (to exit the editing mode and move to the first column of the current line). You can't do much about it in URxvt. The solution is to use X11 capabilities, or rather those of your window manager. This time I got too tired mucking with wmii's configuration and switched to its little brother named dwm. In dwm, you can easily configure any key combinations to perform almost any actions via shell calls. So all I had to do is to tie 'Mod1Mask+XK_0' to 'exec screen -x ses -X select 0'. No longer did I need bindkey lines in screenrc, so I removed them and used Esc-0 in Vim happily ever after.

It was actually quite a lot of fun wading through stuff like this. But the truth is I've only made a few initial steps. There's the immense wilderness of The Unix Way lying ahead of me and I'm thrilled to be able to tear some time away from my routine and improve on my basic skills. I've still so much to learn about terminals, screen(1), Vim, zsh, URxvt, dwm, X11 - and that's only the very beginning. The real fun starts when you reach the point when you have to hack into your tools to make them fit you. But that's another horizon.

Comments (edit)

 

Topic revision: r3 - 19 Nov 2007 - 11:01:02 - Main.AndrewPantyukhin
 

Cenkes - IT Pro Bono