darcs patch: GridSelect

Hi everyone, Here is my little GridSelect toy. I don't think it's polished enough to go into contrib, but as I was asked about it when I posted a screenshot on IRC, I thought that I don't want to hold it back until I found time to polish it. http://clemens.endorphin.org/gridselect.png GridSelect brings up a 2D grid of windows in the center of the screen, and I can select a window with cursors keys. The window is delivered back to the caller of GridSelect, and for the moment the most useful thing it does for me is to raise and focus the selected window. The advantage over the presentation of Tabbed is that there is much more space for window titles, that are now not forced into a single row at the top of the screen, but can occupy multiple rows. Also navigating a 2D grid is also much faster than navigating a linear 1D structure. GridSelect colorizes the cells according to the window class of displayed window. So, all windows with the same class get the same color, and after a while I start to remember which window class has which color. E.g., when I want my xchat window, I just have to search for light green, or if I want an emacs windows, I have to focus on dark violet. There are a few ideas that I haven't found time to toy with. First I like the window arrangement to be more static. At the moment, the windows are sorted (by XMonad) according to its last use and GridSelect arranges them spiraling outwards in a diamond like pattern. Mentally, I can only keep track of the usage history to the depth of 2-3 for blindly selecting window. For everything else, I have to read titles. It would be more helpful to give fixed spots to windows. Of course, windows get deleted and new windows pop up all the time. Probably it would be good to defragment/sort by display time upon a key press. Substring search on window titles is another idea. As GridSelect uses cursor keys for the moment, the rest of the keyboard could be used to enter the string used in searching. GridSelect should then gray out the windows that do not contain the search term. Thanks to the community for XMonad, Fruhwirth Clemens - http://clemens.endorphin.org

Wonderful. Applied. Note the compiler warnings about defaulting. You might want to add an annotation. -- Don clemens:
Hi everyone,
Here is my little GridSelect toy. I don't think it's polished enough to go into contrib, but as I was asked about it when I posted a screenshot on IRC, I thought that I don't want to hold it back until I found time to polish it.
http://clemens.endorphin.org/gridselect.png
GridSelect brings up a 2D grid of windows in the center of the screen, and I can select a window with cursors keys. The window is delivered back to the caller of GridSelect, and for the moment the most useful thing it does for me is to raise and focus the selected window. The advantage over the presentation of Tabbed is that there is much more space for window titles, that are now not forced into a single row at the top of the screen, but can occupy multiple rows. Also navigating a 2D grid is also much faster than navigating a linear 1D structure.
GridSelect colorizes the cells according to the window class of displayed window. So, all windows with the same class get the same color, and after a while I start to remember which window class has which color. E.g., when I want my xchat window, I just have to search for light green, or if I want an emacs windows, I have to focus on dark violet.
There are a few ideas that I haven't found time to toy with. First I like the window arrangement to be more static. At the moment, the windows are sorted (by XMonad) according to its last use and GridSelect arranges them spiraling outwards in a diamond like pattern. Mentally, I can only keep track of the usage history to the depth of 2-3 for blindly selecting window. For everything else, I have to read titles. It would be more helpful to give fixed spots to windows. Of course, windows get deleted and new windows pop up all the time. Probably it would be good to defragment/sort by display time upon a key press.
Substring search on window titles is another idea. As GridSelect uses cursor keys for the moment, the rest of the keyboard could be used to enter the string used in searching. GridSelect should then gray out the windows that do not contain the search term.
Thanks to the community for XMonad,
Fruhwirth Clemens - http://clemens.endorphin.org
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Excerpts from Clemens Fruhwirth's message of Sun Nov 09 22:03:54 +0100 2008:
Hi everyone,
Here is my little GridSelect toy. I don't think it's polished enough to go into contrib, but as I was asked about it when I posted a screenshot on IRC, I thought that I don't want to hold it back until I found time to polish it.
Could you add a little documentation, just to be able to try it, please. TIA, -- Nicolas Pouillard aka Ertai

Nice work! I've added some documentation, plus snippets of code that Clemens and Dominik have posted, to the module. I've also added withSelectedWindow, which provides more functional interface to GridSelect. BTW, when grid is closed, my screen blinks. Any idea why and how to fix that? -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

Clemens Fruhwirth wrote:
There are a few ideas that I haven't found time to toy with. First I like the window arrangement to be more static. At the moment, the windows are sorted (by XMonad) according to its last use and GridSelect arranges them spiraling outwards in a diamond like pattern. Mentally, I can only keep track of the usage history to the depth of 2-3 for blindly selecting window. For everything else, I have to read titles. It would be more helpful to give fixed spots to windows. Of course, windows get deleted and new windows pop up all the time. Probably it would be good to defragment/sort by display time upon a key press.
I really like this idea. What occurs to me is something closer to Expose functionality, showing all the window titles arranged in a manner similar to how they are arranged on your workspaces themselves.
Substring search on window titles is another idea. As GridSelect uses cursor keys for the moment, the rest of the keyboard could be used to enter the string used in searching. GridSelect should then gray out the windows that do not contain the search term.
As a vimperator user, I couldn't agree more. Infix search matching, and it selects when you uniquely identify one. Maybe even numeric hints? I'm not sure how easy this would be with whatever you used to create the titles. Maybe xosd?
Fruhwirth Clemens - http://clemens.endorphin.org
An excellent new add-on, thank you! Braden Shepherdson shepheb
participants (5)
-
Braden Shepherdson
-
Clemens Fruhwirth
-
Don Stewart
-
Nicolas Pouillard
-
Roman Cheplyaka