Re: [dev] [wmii] rumai - "previous" tag

From: Suraj Kurapati <>
Date: Tue, 13 Oct 2009 20:58:04 -0700

On Tue, Oct 13, 2009 at 6:56 PM, Nathan Neff <> wrote:
> Is there a property that refers to the tag that
> was previously viewed?  For example, if I'm on Tag 1,
> and jump to Tag 4, is there some way to access Tag 1?

One way is to monkey patch it like this:

  before: |
    # ugh.. it's a global variable, I know :-(
    $last_view = nil

    class Rumai::View
      alias old_focus focus

      def focus
        $last_view = View.curr unless $last_view == self

And then add a keybinding which focuses $last_view:

  ${mod}-o: | # focus most recently focused view
    $last_view.focus if $last_view

Ideally, this would be a feature of Rumai itself. I'll put it on my
todo list, but patches are welcome. :-)

> I'd like to create an Alt-Tab shortcut that jumps back
> to the previously viewed Tag.

Back in the ruby-wmii days, mfp implemented a sophisticated history
system that adapted to your individual usage pattern:

It might be fun to revive his code.

P.S.  Please cc: me for a faster response.
Received on Wed Oct 14 2009 - 03:58:04 UTC

This archive was generated by hypermail 2.2.0 : Wed Oct 14 2009 - 04:00:01 UTC