Re: [wmii] Select window by name?

From: Suraj N. Kurapati <skurapat_AT_ucsc.edu>
Date: Fri, 04 Aug 2006 08:53:19 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kai Grossjohann wrote:
> I would like to be presented with a list of window names, so that I can
> choose one with completion in the manner of the "actions" and "prorgams"
> "menus" that wmii provides in the default config.
>
> wmii should then switch to the (or a) view showing the window in
> question, then focus it.
>
> Does anyone have something ready-made to do this?

This is present in my Ruby wmiirc posted a while ago:

# Shows the client which has the given ID.
def showClient aClientId
  read('/tags').split.each do |view|
    read("/#{view}").split.grep(/^\d+$/).each do |column|
      read("/#{view}/#{column}").split.grep(/^\d+$/).each do|client|
        if read("/#{view}/#{column}/#{client}/index") == aClientId
          showView view
          write '/view/ctl', "select #{column}"
          write "/view/sel/ctl", "select #{client}"
          return
        end
      end
    end
  end
end
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFE021vmV9O7RYnKMcRAm4zAJ9TdXdHf0Y4NncsWZRqkTH3FpjQdwCbBV1c
bW0vB6loj7QqccgJYMZVRk8=
=qErx
-----END PGP SIGNATURE-----
Received on Fri Aug 04 2006 - 17:54:26 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:11:47 UTC