64 Commits

Author SHA1 Message Date
slotThe
bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00
slotThe
2469269119 New module: XMonad.Prelude
This is a convenience module in order to have less import noise.  It
re-exports the following:

  a) Commonly used modules in full (Data.Foldable, Data.Applicative, and
     so on); though only those that play nicely with each other, so that
     XMonad.Prelude can be imported unqualified without any problems.
     This prevents things like `Prelude.(.)` and `Control.Category.(.)`
     fighting with each other.

  b) Helper functions that don't necessarily fit in any other module;
     e.g., the often used abbreviation `fi = fromIntegral`.
2021-05-13 17:44:47 +02:00
Sergey Alirzaev
1033818631
ghc-9.0.1 compatibility fixes 2021-03-26 05:20:49 +03:00
Tomas Janousek
2691e3a490 X.A.GridSelect: Use OVERLAPPABLE, seems to help with unnecessary recompiles
Without this, any change to tests triggers a recompile of GridSelect
when invoking "stack test", adding a couple seconds. This seems to help.
2021-01-26 13:43:35 +00:00
slotThe
78d526d1dd Get rid of unused imports
Starting with 5240116f3cdf169e3aa226d9f8206a5f5b99c867 we only support
GHC versions 8.4.4 and up (more precisely, the GHC version associated
with stackage lts-12 and up).  The imports in question are now in
Prelude and need not be imported explicitly.
2020-12-14 13:41:28 +01:00
slotThe
5140f5b5d0 Remove things deprecated by Data.Default 2020-11-16 10:31:02 +01:00
slotThe
22aebcb26d Replace 'fmap f $ fa' with 'f <$> fa', apply functor laws 2019-10-08 11:13:02 +02:00
slotThe
53b57eba14 Replace liftM and fmap with <$> 2019-10-08 10:33:56 +02:00
Sam Doshi
a79a116934 improve the vertical centring in X.A.GridSelect 2017-02-18 13:46:30 +00:00
Sam Doshi
b1dee9b0b4 allow border colour to be specified in GSConfig 2017-02-17 08:29:12 +00:00
f1u77y
bbbdad8faa prevent losing focus in gridSelect(fix #16) 2016-02-14 20:15:26 +03:00
Dmitri Iouchtchenko
2f5e49919d Add rearrangers to X.A.GridSelect 2013-01-23 04:40:38 +00:00
Dmitri Iouchtchenko
2e1474f230 Avoid repainting elements in X.A.GridSelect 2013-01-23 04:38:50 +00:00
Dmitri Iouchtchenko
e98f0657bb Give a name to the initial state in X.A.GridSelect 2013-01-21 06:13:24 +00:00
Daniel Wagner
0f1b6fb772 use Data.Default wherever possible, and deprecate the things it replaces 2013-05-28 01:39:09 +00:00
Jesper Reenberg
6f996bb21f Fixed X.A.GridSelect to be consistent in the way it (now) sorts the shown
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.
2012-05-01 18:04:15 +00:00
Adam Vogt
d4c7c51616 Export types to improve haddock links. 2011-11-18 19:06:42 +00:00
Daniel Wagner
68d49ad3aa get ready for GHC 7.4: Num a no longer implies (Eq a, Show a) 2011-11-15 02:26:50 +00:00
Ben Boeckel
9f65044be5 add-movenext-moveprev-bindings
Adds default bindings to GridSelect for the moveNext and movePrev motions.
2011-05-15 19:33:26 +00:00
Ilya Portnov
af9e1863eb Extend GridSelect navigation
Add moveNext and movePrev, which move selection to next/previous item.
2011-05-15 15:42:46 +00:00
Adam Vogt
ed12889c2c Fix A.Gridselect image links (thanks dobblego) 2011-01-19 23:01:13 +00:00
Adam Vogt
52d3aa1500 Rename state in A.Gridselect to avoid name shadowing (mtl-2) 2010-11-15 23:22:22 +00:00
Clemens Fruhwirth
cbb20fb3a8 Substring search support for X.A.GridSelect. As keymaps get more complicated to support different styles, the gs_navigate element is fundamentially changed. 2010-11-02 21:12:13 +00:00
Clemens Fruhwirth
e544e09cbb Make substring search case insensitive 2010-10-16 21:29:04 +00:00
Clemens Fruhwirth
3a886e0844 Introduce grayoutAllElements in X.A.GridSelect 2010-10-16 21:25:59 +00:00
Clemens Fruhwirth
27fc66bb2c Add substring filter to td_elementmap 2010-10-16 18:36:44 +00:00
Clemens Fruhwirth
3a35fe3f3d Refactor for ad-hoc element and position matching turning td_elementmap into a function using the new td_availSlot and td_elements fields 2010-10-16 18:35:54 +00:00
Clemens Fruhwirth
06bb702240 Remove nub from diamondLayer in X.A.GridSelect 2010-10-16 18:31:32 +00:00
Clemens Fruhwirth
3cee73fe02 Convert access of td_elementmap from field styled to function call styled in X.A.GridSelect 2010-10-16 16:47:57 +00:00
Clemens Fruhwirth
ffe08858ab Make use of field names when constructing TwoDState in X.A.GridSelect 2010-10-16 16:41:51 +00:00
Tomas Janousek
1d6a171dd2 X.A.GridSelect: documentation typo fix
spotted by Justin on IRC
2009-12-11 18:25:15 +00:00
Adam Vogt
e8cfb696ad A.GridSelect shouldn't grab keys if there are no choices.
Thanks thermal2008 in #xmonad for bringing up the corner case when gridselect
is run with an empty list of choices.
2009-12-10 18:30:38 +00:00
Adam Vogt
8cda47f19f Rename gridselectViewWorkspace to gridselectWorkspace, add another example.
The name should be more general to suggest uses other than just viewing other
workspaces.
2009-11-12 21:14:35 +00:00
Daniel Schoepe
da094a635d Add gridselectViewWorkspace in X.A.GridSelect 2009-11-09 15:58:15 +00:00
Adam Vogt
920bf15e04 Inline tupadd function in A.GridSelect 2009-11-01 19:03:12 +00:00
Adam Vogt
74a03cd8fb Refer to modm as the current modMask
This makes the config suggestions consistent with the current template.
2009-10-22 04:11:26 +00:00
Daniel Schoepe
8f8e650537 Clean keymask in GridSelect(solves issue 318) 2009-10-21 22:34:04 +00:00
Adam Vogt
45db2ebfbe More docs formatting in A.GridSelect 2009-10-16 20:31:32 +00:00
Adam Vogt
721cda38cc In A.GridSelect correct haddocks 2009-10-16 17:11:59 +00:00
Adam Vogt
e9a432298c Rearrange the GSCONFIG class in A.Gridselect 2009-10-05 02:32:27 +00:00
Adam Vogt
4509a8b696 Add a GSCONFIG class to overload defaultGSConfig.
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.
2009-10-03 19:38:04 +00:00
Adam Vogt
fb7539d74b Add a screenshots section in the A.GridSelect haddocks 2009-10-04 16:08:16 +00:00
Adam Vogt
0bb00440dc Group functions in GridSelect haddock, add an inline screenshot. 2009-10-03 18:19:27 +00:00
Jan Vornberger
77f52bc84d Extended GridSelect
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)
2009-09-30 15:27:41 +00:00
Clemens Fruhwirth
491e21b3b9 Replace nextEvent with maskEvent to prevent GridSelect from swallowing unrelated events (such as map/unmap) 2009-08-09 13:10:55 +00:00
Adam Vogt
f22c4624a3 Revert to old behavior where unmatched keys do not exit the eventloop for A.GridSelect 2009-07-27 01:23:02 +00:00
Adam Vogt
218595881f Make direction keybindings configurable in A.GridSelect 2009-07-26 02:04:38 +00:00
Adam Vogt
5cd48cac7c Remove trailing whitespace from many modules 2009-07-05 20:12:05 +00:00
Daniel Schoepe
6686d32f56 Update haddock description for Actions.GridSelect 2009-04-22 17:25:10 +00:00
Daniel Schoepe
e431c38c5e Mouse support for GridSelect
GridSelect now allows selecting an element by a click with the left mouse button.
2009-04-09 22:33:02 +00:00