[xmonad] darcs patch: Extend navigation functions in X.A.GridSelect.
Ilya Portnov
portnov84 at rambler.ru
Sun May 15 18:00:35 CEST 2011
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Extend-GridSelect-navigation.dpatch
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20110515/17de8f15/attachment-0001.txt>
More information about the xmonad
mailing list