elements when modifying the searchString.
The implemented ordering sorts based on how "deep the needle is in the
haystack", meaning that searching for "st" in the elements "Install" and "Study"
will order them as "Study" and "Install". Previously there was no ordering and
when using GridSelect to select workspaces, the ordering was not consistent, as
the list of workspaces (if not modified manually) is ordered by last used. In
this case either "Study" or "Install" would come first depending on which
workspace was last visited.
This uses -XOverlappingInstances to provide a fallback instance which uses the
focusedBorderColor and normalBorderColor, but that part is optional.
User's configs should use -XNoMonomorphismRestriction if they want to avoid
writing a type signature for myGSConfig.
Also, type variables become ambiguous in expressions like:
> myGSConfig = defaultGSConfig { gs_navigate = neiu `M.union` gs_navigate defaultGSConfig }
> where neiu = M.map (\(x,y) (a,b) -> (x+a,y+b)) $ M.fromList
> [((0,xK_n),(-1,0)) ,((0,xK_e),(0,1)) ,((0,xK_i),(1,0)) ,((0,xK_u),(0,-1))]
But that can be resolved with the appropriate (`asTypeOf`myGSConfig) applied to
the second defaultGSConfig, or the use of some other method for modifying
existing fields.
1) Added another convenience wrapper that allows to select an X() action
from a given list.
2) Implemented the option to change the position of the selection diamond.
(Re-recorded from Bluetile repo, rebased to current darcs)
This patch generalizes Actions.GridSelect to work for arbitrary (String,a)-lists. The changes break configurations that used `gridSelect' directly, which is now named gridSelectWindow. As an example for uses of the GridSelect-UI, I included a function to spawn an application from a list of commands(`spawnSelected').
* handle/eventLoop carried the display and the drawing window as
parameters. The display is available from the embedded X monad, the
drawing windows was added.
* updateWindows now takes a list of windows to
update. updateAllWindows updates all windows.
* only the windows that are modified by key movements are redrawn
now. This means less flickering.