25 Commits

Author SHA1 Message Date
brandon s allbery kf8nh
6e1a1fe0df
Stray def in additionalNav2DKeysP documentation 2022-06-24 19:47:14 -04:00
Yecine Megdiche
2d33f18dec XMonad.Prelude: add the WindowScreen type
`WindowScreen` is a type synonym for the specialized `Screen` type, that
results from the `WindowSet` definition in XMonad.Core. Having this type
defined and exported in a central module saves extension developers from
trying to reconstruct it, whenever the general `Screen i l a sid sd` is
not suitable.

Note: this should be moved to `XMonad.Core` in the next core release.
2022-02-24 20:00:46 +01:00
slotThe
b6a8069e44 Prefer safe alternatives to getWindowAttributes
Whenever possible, prefer the safe wrappers withWindowAttributes or
safeGetWindowAttributes to getWindowAttributes.

Places where these are not applicable are limited to layouts, where
there is not good "default value" to give back in case these calls fail.
In these cases, we let the exception handling of the layout mechanism
handle it and fall back to the Full layout.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/146
2021-11-13 21:26:02 +01:00
Tomas Janousek
8197cd9105 Fix -Wincomplete-uni-patterns warnings
I am not proud of this.
2021-11-05 10:14:20 +00:00
slotThe
38c11c1e3c Add "Description" field to module headers
Fixes: https://github.com/xmonad/xmonad-contrib/issues/592
2021-09-26 14:15:54 +02:00
Joan Milev
f732082fdc Remove all derivations of Typeable
Typeable has been automatically derived for every type since GHC 7.10,
so remove these obsolete derivations.  This also allows us to get rid of
the `DeriveDataTypeable` pragma quite naturally.

Related: https://github.com/xmonad/xmonad/pull/299 (xmonad/xmonad@9e5b16ed8a)
Related: bd5b969d9ba24236c0d5ef521c0397390dbc4b37
Fixes: https://github.com/xmonad/xmonad-contrib/issues/548
2021-06-18 14:10:23 +02:00
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
673f727206 Fix GHC warning: -Wname-shadowing
Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-05-20 17:32:03 +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
slotThe
5140f5b5d0 Remove things deprecated by Data.Default 2020-11-16 10:31:02 +01:00
L.S. Leary
4a98a27950 Added navigation strategy sideNavigation and parameterised variant sideNavigationWithBias to X.A.Navigation2D. 2017-12-16 17:37:52 +13:00
L.S. Leary
c778b9c2af Generalised (and hence deprecated) hybridNavigation to hybridOf so that users can choose order of preference of navigation strategies. 2017-09-27 07:25:35 +13:00
geekosaur
a372b455dc typo in navigation2DP example
The example code in the documentation uses `navigation2D` instead of `navigation2DP`, evidently a simple copy/paste error. No actual code change.
2017-02-18 17:19:59 -05:00
L.S. Leary
4358f58de8 Swapped pickSomething for <|> in doHybridNavigation. 2016-08-30 13:11:54 +12:00
L.S. Leary
ea6e1a5d6d Removed extraneous blank line from Nav2D. 2016-08-29 16:53:46 +12:00
LSLeary
4aaf053273 Rewrote doHybridNavigation. 2016-08-29 14:30:03 +12:00
L.S. Leary
76565e42c4 Removed an extraneous comment that had been accidentally left in place. 2016-08-27 03:49:52 +12:00
L.S. Leary
a7d5696e5a Punctuation tweak in docs. 2016-08-27 03:27:08 +12:00
L.S. Leary
b9215181bb Rather than writing over the vanilla Line navigation function, Hybrid navigation has been implemented separately. 2016-08-27 03:17:05 +12:00
L.S. Leary
806a501d51 Modified Line to default to Center if it can't move. This provides the best way to get around if you use gaps and float no windows. 2016-08-27 02:37:35 +12:00
Devin Mullins
c648a3959b X.A.Navigation2D: add convenience functions for setting config & keybindings
1. Added 'additionalNav2DKeys' which adds keybindings for the cartesian product
   of direction keys and (modifier, action) pairs given.
2. Added 'navigation2D' which combines that with 'withNavigation2DConfig'.
3. Added 'additionalNav2DKeysP' and 'navigation2DP' which do the same, but use
   the 'additionalKeysP' syntax.
2014-10-02 07:57:57 +00:00
Daniel Wagner
0f1b6fb772 use Data.Default wherever possible, and deprecate the things it replaces 2013-05-28 01:39:09 +00:00
Daniel Wagner
daa2731d3d eliminate references to defaultConfig 2013-05-28 00:58:25 +00:00
Adam Vogt
de84dfef0d Remove trailing whitespace. 2012-11-09 01:41:56 +00:00
Norbert Zeh
59bfe97f63 X.A.Navigation2D
This is a new module to support directional navigation across multiple screens.
As such it is related to X.A.WindowNavigation and X.L.WindowNavigation, but it
is more general.  For a detailed discussion of the differences, see
http://www.cs.dal.ca/~nzeh/xmonad/Navigation2D.pdf.
2011-12-08 20:58:42 +00:00