off by one for 2007 September

<M <Y
Y> M>

Thu Sep 06 09:37:23 PST cool screen tricks:

I used to do this one all the time, but recently forgot it. I had to look it back up again.

Anyway, when you're using screen (which is all the time, right?) and you wish that a particular screen was at a different index (like let's say when you're running some job that you don't want to start over) you can just reassign its index like this:

<escape>:number n

... where escape is probably control-a (aka C-a in screen lingo) and n is the numeric index you'd like the screen to be at.

Yes, it's just that simple!

Another cool screen trick that I'm going to throw in for FREE (if you call in the next 30 seconds) is nesting screens. There are two ways to do this:

1. Set a unique escape in each screen. You can do this by setting a new escape in one of the screens:

<escape>:escape ^Xx

... to set the escape to control-x in that screen. Then you can pick up the screen inside another screen and use the appropriate escape sequence in each screen context.

2. In this method, you don't change the escape sequences at all, but you just hit the sequence twice to "drill down" into a nested screen. So for example, if you have a screen within a screen, and within the nested screen you want to change to the next window, type:

<escape><escape>n

... where merely typing

<escape>n

... would just change the screen in the "top level" screen.

At these prices you can't say no!

Sat Sep 22 15:36:03 PST firefox forwards and backwards navigation:

Thinkpad laptops have two special "forward" and "backward" keys above the typical left and right keys that are used for paging in applications like Firefox and other web browsers. Unfortunately, they don't work out of the box in Ubuntu like other buttons (like the volume knobs, suspend, etc.). I hate using Alt-Left/Right -- why make two keystrokes when I should be able to use one?

So I have been looking for a solution, but complicating this issue is that old solutions to this problem don't work in Firefox +v2.0, firefox extensions that advertise this ability are pre 2.0 as well, and Firefox remote tricks assigned to commands don't seem to work either (I think because of a vulnerability in Firefox remote? I'm not sure.)

Anyway, this site has a working howto, and it's really easy. The short version is to edit your ~/.Xmodmap to make back (keycode 234) and forwards (keycode 233) F19 and F20, and then edit browser.xul to use that instead of the Alt-Arrow combos. For Ubuntu anyway one thing different from the howto is that browser.xul is already unzipped in /usr/share/firefox/chrome/ ... etc, not in your homedir or .mozilla, etc. Just edit it and save it; you don't need to re-package chrome or whatever although you do need to restart Firefox. This material should get updated in the ThinkWiki and other sites... but I'm not going to do it.

Incidentally, the "back" and "forward" buttons on the new Microsoft Natural Ergonomic Keyboard 4000 use the same keycodes, so if you have one attached to your Thinkpad like me, this is a two-for-one deal.

Update: You can leave the old hotkeys in and just add the new ones to keep the old "alt-arrow" mapping and add the new thinkpad arrows if you want! Beaujolais!


[Main]

Unless otherwise noted, all content licensed by Peter A. H. Peterson
under a Creative Commons License.