ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] third window


From: shawn
Subject: Re: [RP] third window
Date: Tue Oct 9 22:36:10 2001
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.105

Martin Samuelsson <address@hidden> writes:

> As always, I havn't read the source, but I guess that there is no big 
> difference in implemening :goback_1 and implementing the whole thing. I 
> don't think rp actually keeps track of the last-but-last window. It's more 
> likely that there is some kind of list containing all windows.

Each window has a field `last_access' which is a unique number. The
highest number is the most recently accessed window and the lowest
number is...well you get the idea. Sort the window list by last_access
and you have the last window (goback 1), the last last window (goback 2), the
last last last window (goback 3).

I could add a formatting code to the 'windows' command so you could
get at this number. Then in a simple script you could find the last
last window (or whatever) and jump to it. Bind a key to 'exec' your
script and you're done. How does that sound?

ie:

$ ratpoison -c "windows %l %n %t"
2349 0 Emacs
2001 1 XTerm
54 2 XTerm
52 3 XTerm
23 4 XTerm
123 5 XTerm
677 8 XTerm

use 'sort -n' and grab the 3rd line, grab the 2nd field and run
ratpoison -c "select n" where n is the aforementioned 2nd
field. 


Infact, its just been added in CVS :).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]