705 Commits

Author SHA1 Message Date
L. S. Leary
b9263ad17e Write new module: X.A.MostRecentlyUsed 2023-01-12 17:53:26 +01:00
L. S. Leary
dd7855da3d Factor shared logic out of X.A.Cycle* modules
These modules were duplicating a substantial amount of low-level code.

`X.A.CycleWorkspaceByScreen` had already separated most of the
implementation details from the logic with `repeatableAction`; all that
was left was to generalise it a little further, put it in a suitable
place and express the other modules through it.
2023-01-12 17:52:18 +01:00
Tony Zorman
e85f0151b2 X.A.VisualSubmap: Fix example 2023-01-11 16:50:42 +01:00
Tony Zorman
57b5055858 X.A.Search: Add arXiv, clojureDocs, cratesIo, rustStd, zbmath
Related: 233a05908d6953be79f02a030ab5f20272357630
         (https://github.com/xmonad/xmonad-contrib/pull/777)
2022-11-15 09:29:08 +01:00
Tony Zorman
af5fced79a X.A.Search: voidpackages -> voidpgks_x86_64{_musl}
Musl on Void is popular enough that it makes sense to provide an extra
search engine for it.

Related: https://github.com/xmonad/xmonad-contrib/pull/777/files
2022-11-13 10:16:23 +01:00
Luc-Saccoccio
233a05908d Added AUR, Flora, nCatLab, ProtonDB, RosettaCode, Sourcehut, Steam, Void
Linux packages. Reorganized the list, and added wiktionary which was
forgotten in the list although it was implemented.
2022-11-12 12:43:12 -05:00
Tony Zorman
e406e27139
Merge pull request #774 from slotThe/nsp/exclusive
X.U.NamedScratchpad: Add exclusive scratchpad capabilities
2022-11-11 21:06:10 +01:00
L. S. Leary
608a8e4b88 Fix documentation bug in X.A.GridSelect 2022-11-08 23:02:51 +13:00
Tony Zorman
8cb789af39 CI: Compatibility with mtl 2.3.1
Libraries like Control.Monad are no longer exported from
Control.Monad.Reader et.al.

Related: https://github.com/xmonad/xmonad/pull/427
         xmonad/xmonad#d170e99bc5e97db96be9a02b72149103e8d419af
2022-11-03 08:25:00 +01:00
Tony Zorman
48a6d34f55 X.Prelude: Add findM
Several definitions of this were scattered over a few modules, so just
re-export it from our prelude.
2022-11-02 11:17:26 +01:00
Adam Plaice
ca866229f6 Fix most remaining broken inter-module docs links
The links were broken due to:

1. Incorrect quotes (' instead of " for module links and occasionally
vice-versa).

2. Changes in the name of the "target" module not reflected in the
"source" docs.

3. Typos to begin with.

4. Use of `<foo>` in the docs is rendered as just `foo` with a link to
`/foo`.

5. Similarly for `"Foo"` if it starts with a capital letter (and hence
could be a module).

6. Markup inside `@` code blocks still being applied.

e.g. `@M-<arrow-keys>@` is rendered as `M-arrow-keys` with a spurious
hyperlink from arrow-keys to `/arrow-keys`, which is confusing.

Three links from XMonad.Util.Run have been removed outright, since
they're no longer examples of the usage of 'runProcessWithInput'.
WmiiActions has been gone since 2008, while XMonad.Prompt.Directory
and XMonad.Layout.WorkspaceDir haven't been using
'runProcessWithInput' since 2020 and 2012, respectively.

In some cases the `<foo>` were surrounded with @, especially in the
case of key definitions, for consistency.  (This wasn't done
everywhere, because it looks ugly in the source.)

MoreManageHelpers has never been in xmonad-contrib.  ManageHelpers
seems to fill the expected role.

In the case of the module description for X.H.ManageDebug the quotes
were simply removed because none of the likely options to make the
link work were successful.
2022-11-01 19:35:55 +01:00
Tony Zorman
570eb8ccb8 X.A.Navigation2D: Add sideNavigation as to default tiled navigation
Add sideNavigation as a fallback if needed.  This should not have any
user-facing behaviour change when not using gaps or spacing, as line
navigation is preferred.  However, users who do use spacing or gaps
should now potentially not have to change the default strategy in order
to have a usable module.
2022-10-21 09:18:06 +02:00
Tony Zorman
cca2ccfc71 X.A.Navigation2D: More prominently document strategies
Also, add a note that users who use gaps or spacing may need to look
into these strategies a bit more deeply.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/627
2022-10-21 09:18:06 +02:00
Tony Zorman
4c8edd3bfb X.A.FloatKeys: Add direction{Move,Resize}Window
These are simpler, more easily understood, alternatives to the existing
functions.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/712
2022-10-21 09:18:04 +02:00
Tony Zorman
3d65a6bf72 Refer to the tutorial instead of X.D.Extending more often
Essentially, whenever the tutorial actually has decent material on the
subject matter.  The replacement is roughly done as follows:

  - logHook → tutorial
  - keybindings → tutorial, as this is thoroughly covered
  - manageHook → tutorial + X.D.Extending, as the manageHook stuff the
    tutorial talks about is a little bit of an afterthought.
  - X.D.Extending (on its own) → tutorial + X.D.Extending
  - layoutHook → tutorial + X.D.Extending, as the tutorial, while
    talking about layouts, doesn't necessarily have a huge focus there.
  - mouse bindings → leave this alone, as the tutorial does not at all
    talk about them.
2022-10-21 09:17:43 +02:00
slotThe
f02b3a9869 XMonad.Actions.SinkAll: Deprecate 2022-09-22 07:51:52 +02:00
slotThe
287b8bf95f XMonad.Layout.Navigation2D: Remove deprecations 2022-09-22 07:39:54 +02:00
slotThe
16701c2df2 XMonad.Actions.MessageFeedback: Remove deprecations 2022-09-22 07:39:54 +02:00
Tony Zorman
24f11362c7 docs: Add additional external blog posts
This may seem a bit self-indulgent, but both of these features are
either quite new or so old that no one remembers them anymore, so not a
lot of up-to-date content exists for them.
2022-09-22 07:37:28 +02:00
brandon s allbery kf8nh
2a6ac58c71
change a defaultGSConfig doc to a def 2022-07-12 14:25:13 -04:00
Tomas Janousek
fc482b8771 X.A.SpawnOn, X.H.WindowSwallowing: Fix parsing of process PPIDs
This fixes several issues related to parsing of parent PIDs:

* A process with lines or spaces or parentheses in its process name
  would confuse the code in X.A.SpawnOn and possibly lead to a
  `Prelude.read: no parse` exception.

* `X.H.WindowSwallowing.isChildOf` looked for the parent PID anywhere in
  the output of pstree, so single-digit parent PIDs would be considered
  as parents of any process with that digit anywhere in its chain of
  parent PIDs. (Note that apps in PID namespaces like in Flatpak often
  have single-digit PIDs.)

* `pstree` is no longer required in `$PATH`.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/726
2022-07-06 09:00:35 +01:00
brandon s allbery kf8nh
6e1a1fe0df
Stray def in additionalNav2DKeysP documentation 2022-06-24 19:47:14 -04:00
John Lind
a7fd31d233 Replace <+> with <> 2022-05-02 08:28:36 +02:00
Tomas Janousek
3adb47235f Apply hlint 3.4 hints 2022-05-02 00:06:59 +01:00
Ether
51907ad59e X.A.PerLayoutKeys: Fix typo 2022-05-01 08:49:54 +02:00
Martin Kozlovsky
3f590b86c6 New module: XMonad.Actions.RepeatAction
Closes: https://github.com/xmonad/xmonad-contrib/issues/489
2022-04-17 10:25:47 +02:00
Abhijit Menon-Sen
cf3a2be6d9 Fix missing prompt configuration in DynamicProjects example 2022-04-12 12:25:44 +05:30
brandon s allbery kf8nh
0833c347e7 Missed a reference to bindOn
The perils of making 1-line changes to another module….

Co-authored-by: Tomáš Janoušek <tomi@nomi.cz>
2022-04-06 13:13:55 -04:00
brandon s allbery kf8nh
84caf89894 new module XMonad.Actions.PerLayoutKeys 2022-04-06 13:13:55 -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
Nikolay Yakimov
68c967ec0c X.A.{Grid,Tree}Select, X.Prompt: Fix keybindings like Shift-Tab and similar
This changes KeyPress handling in these modules to behave much closer to
how xmonad core itself handles keypresses. The primary difference lies
in that xmonad reads raw KeyCode and then converts it to unmodified
KeySym, while these modules used `lookupString` to find the actual
keysyms. As a consequence, key definitions like `(shiftMap, xK_Tab)`
didn't work on many layouts because an actual KeySym for `Shift-Tab` is
commonly `ISO_LEFT_TAB`, and not `Tab`.

Closes: https://github.com/xmonad/xmonad-contrib/pull/590
Co-authored-by: Tomas Janousek <tomi@nomi.cz>
2022-02-10 14:42:23 +00:00
Tomas Janousek
12c5518852 X.A.Submap, X.Prompt: Use cleanKeyMask
This replaces the custom `cleanMask` extension in these modules—which
only filtered out XKB group bits and Button5Mask¹—with the new
`cleanKeyMask` which additionally filters out all mouse buttons, as
these aren't relevant for key bindings.

¹) Filtering out Button5Mask was probably an off-by-one mistake.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/290
Related: https://github.com/xmonad/xmonad-contrib/pull/590
2022-02-10 14:23:01 +00:00
Tomas Janousek
adced0a8c8 X.A.{Grid,Tree}Select: Fix keybindings in secondary kbd layouts
We didn't clean XKB group bits out of the KeyPress events' state so key
bindings only worked in the primary keyboard layout (first XKB group).
To fix this, this adds a `cleanKeyMask` function to X.Prelude which is
analogous to `cleanMask` but aimed at cleaning regular KeyPress states
(as opposed to just KeyPresses from passive key grabs), and this is then
used instead of `cleanMask`.

Related: https://github.com/xmonad/xmonad-contrib/issues/290
Related: https://github.com/xmonad/xmonad-contrib/pull/590
2022-02-09 23:53:16 +00:00
slotThe
cf1d966ee6 X.A.Submap: Add visualSubmap
Add a `visualSubmap` function, which works much like the regular
`submap` one, except that it visualises the available choices in a
pop-up window.

Related: https://github.com/xmonad/xmonad-contrib/issues/472
2022-02-03 08:53:33 +01:00
Tomas Janousek
201a14718e X.A.GroupNavigation, X.H.WorkspaceHistory: Leak fix cleanups
Simplify stuff a bit. Prevent memory leaks additionally in:
`workspaceHistoryTransaction` and `workspaceHistoryModify`.

Related: https://github.com/xmonad/xmonad-contrib/pull/653
2022-01-15 19:12:32 +00:00
exorcist365
be1201cdeb X.A.FloatKeys: Export ChangeDim
Haddock displays exported types in a much nicer way.
2022-01-08 09:06:00 +01:00
afreakk
7bcd81a7e9 keysMoveWindow signature D -> ChangeDim 2022-01-02 20:41:43 +01:00
Yecine Megdiche
be6530808f X.A.Minimize: fix formatting 2022-01-01 17:55:51 +01:00
ramon diaz-uriarte (at Phelsuma)
540635fe1c X.A.DynamicWorkspaces: Honor searchPredicate in withWorkspace
If the user's prompt configuration has a custom `searchPredicate` (e.g.,
`X.P.FuzzyMatch.fuzzyMatch`) the `withWorkspace` prompt should make use
of it (instead of defaulting to an `isPrefixOf`-style matching).  For
details see

    https://mail.haskell.org/pipermail/xmonad/2021-December/015491.html
2021-12-28 14:00:52 +01:00
Ilya
42b392e06a X.U.Font: Add font-fallback support
This adds basic font-fallback support for X.U.Font, as well as modules
using it, like X.Prompt and X.A.TreeSelect.

In the new system, multiple fonts may be specified with the syntax

    "xft:iosevka-11,FontAwesome-9"

Fixes: https://github.com/xmonad/xmonad-contrib/issues/208
2021-12-11 15:08:42 +01:00
Tony Zorman
28aa164abd
Merge pull request #647 from slotThe/safe-window-attrs
Prefer safe alternatives to getWindowAttributes
2021-11-28 20:43:02 +01:00
Ruben Astudillo
b75d0d265e Use deepseq instead of parallel 2021-11-24 15:24:08 -03:00
Ruben Astudillo
ed5d6f0d78 Fix historyHook memory leak
updateHistory leaks unfiltered windows from previous states as it is never
forced. The consumer of such data structure is not visible to ghc, so the
demand analysis has to fallback on pure laziness.

We fix this inserting evaluation points on the `historyHook` function. We do
this for two reasons, this is the only function calling `updateHistory`.
Plus we cannot do it clearly at the `updateHistory` function as we operate
inside a continuation on withWindowSet. In respect to the `put`, everything
would be a big thunk.
2021-11-23 17:50:18 -03:00
Platon Pronko
ca5841f7fa X.A.WindowNavigation: Fix navigation getting stuck
Update left and right navigation to behave correctly even if the
currently saved position is directly on the edge of the focused window.
This makes the L/R behavior consistent with U/D navigation.

How to reproduce the issue on a 16:9 resolution like 1920x1080:

  - configure Grid layout;
  - open 4 terminals;
  - navigate to the top-right terminal;
  - open another terminal;
  - immediately close it;
  - try navigating left from the currently focused top-right terminal;
  - observe navigation being "stuck".
2021-11-22 21:12:17 +01:00
slotThe
61c3aff33c X.A.CycleWorkspaceByScreen: Document
The documentation for this module was lacking, making it significantly
harder to use than the functionality wise very similar
X.A.CycleRecentWS—change that.
2021-11-21 16:42:55 +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
slotThe
99e1b30e86 X.A.Search: Remove num=100 from google search engine
It no longer does what it was intended to do, and in fact, now does the
opposite.

When X.A.Search came to be in ~2007, Google's default of showing 10 or
so search hits was radically inadequate for poweruser needs. The 'num'
argument was used to force display of more hits (i.e., n meant 'display
at least n hits per page').

However, at some point, 'num' was inverted to mean something
catastrophically different: now it apparently means 'display no more
than n hits, total'. If you use that parameter, you will get 1 or 2
pages of hits at most reading 'About 98 results' or 'About 99
results' (no matter how many millions are available), and a blurb at the
bottom of the final page saying 'In order to show you the most relevant
results, we have omitted some entries very similar to the 99 already
displayed.' Removing the 'num' parameter then shows you all the hits
that were suppressed.

This is bad, and should be removed.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/642

Co-authored-by: Gwern Branwen <gwern@gwern.net>
2021-11-08 16:46:24 +01:00
Tomas Janousek
5aff766a4c Apply hlint 3.3 hints 2021-11-05 10:14:20 +00:00
Tomas Janousek
8197cd9105 Fix -Wincomplete-uni-patterns warnings
I am not proud of this.
2021-11-05 10:14:20 +00:00
Tomas Janousek
850a3c245e Fix -Woperator-whitespace-ext-conflict warnings 2021-11-05 10:14:20 +00:00