darcs patch: Extend navigation functions in X.A.GridSelect.

Hello all. This patch adds two functions to XMonad.Actions.GridSelect: moveNext and movePrev. They move selection in gridselect to next and previous elements, respectively. One may map them to Tab/Shift-Tab keys. For example, I use Alt-Tab to call gridselect with windows on current workspace, and myGSConfig = defaultGSConfig { gs_navigate = search, gs_font = myFont } search :: TwoD a (Maybe a) search = makeXEventhandler $ shadowWithKeymap keymap handler where keymap = M.fromList [ ((0,xK_Escape), cancel) ,((0,xK_Return), select) ,((0,xK_Left) , move (-1,0) >> search) ,((0,xK_Right) , move (1,0) >> search) ,((0,xK_Down) , move (0,1) >> search) ,((0,xK_Up) , move (0,-1) >> search) ,((0,xK_Tab) , moveNext >> search) ,((shiftMask,xK_Tab), movePrev >> search) ,((0,xK_BackSpace), transformSearchString (\s -> if (s == "") then "" else init s) >> search) ] handler (_,s,_) = do transformSearchString (++ s) search So, I can use Alt-Tab-Tab-Tab-Return to select needed window. WBR, Ilya Portnov.

On Sun, 15 May 2011 22:00:35 +0600, Ilya Portnov
Hello all.
This patch adds two functions to XMonad.Actions.GridSelect: moveNext and movePrev. They move selection in gridselect to next and previous elements, respectively. One may map them to Tab/Shift-Tab keys. For example, I use Alt-Tab to call gridselect with windows on current workspace, [..]
Applied, thanks!

This 1-patch bundle was just applied to http://code.haskell.org/XMonadContrib:
20110515154246 Ilya Portnov

On Sun, 15 May 2011 22:00:35 +0600, Ilya Portnov
Hello all.
This patch adds two functions to XMonad.Actions.GridSelect: moveNext and movePrev. They move selection in gridselect to next and previous elements, respectively. One may map them to Tab/Shift-Tab keys. For example, I use Alt-Tab to call gridselect with windows on current workspace, and [..]
Hi, as a minor improvment you might want to alter those functions to select the next entry that is the next graphically adjacent element, instead of just the next element in the list. Currently this makes moveNext spiral outwards from the center, but I think this is dependent on the way td_elementmap is constructed, i.e. an implementation detail. (If this is the intended behavior, it should be documented in movePrev/moveNext's, and possibly where td_elementmap is constructed.) Cheers, Daniel
participants (3)
-
Daniel Schoepe
-
darcswatch@nomeata.de
-
Ilya Portnov