2994 Commits

Author SHA1 Message Date
Illia Bobyr
cf975d082e
EwmhDesktops: _NET_CLIENT_LIST_STACKING: In focus order
Order workspaces based on the visibility, before collecting windows.
`_NET_CLIENT_LIST_STACKING` is supposed to be in the focus order.
2022-11-02 11:03:08 -07:00
Tony Zorman
ab6299a488 X.U.ExclusiveScratchpads: Deprecate
Obsoleted by the exclusive scratchpad functionality of X.U.NSP.
2022-11-02 11:17:51 +01:00
Tony Zorman
226629977b X.U.NamedScratchpad: Add documentation about other types
With [1] and now [2], NSP has a lot more functionality that used to be
confined to other modules.  This is indicated in the TOC when viewing
the documentation, but it should perhaps be more prominently mentioned
in the introduction/usage docs.

[1]: https://github.com/xmonad/xmonad-contrib/pull/690
     533e17135e953938834551558062566a73e1ae2c
[2]: https://github.com/xmonad/xmonad-contrib/pull/774
2022-11-02 11:17:51 +01:00
Tony Zorman
f059829f03 X.U.NamedScratchpad: Add exclusive scratchpad capabilities 2022-11-02 11:17:51 +01:00
Tony Zorman
49e9570f12 X.U.NamedScratchpad: Factor out isNSP
This function can be pretty useful in a general context, so let's factor
it out.
2022-11-02 11:17:49 +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
d301affabb
Merge pull request #760 from slotThe/orgmode/refile
X.P.OrgMode: Add orgPromptRefile[To]
2022-10-31 14:38:25 +01:00
Tony Zorman
a97a1acf87 X.P.OrgMode: Remove the need for todoKeywords argument
This is (i) much simpler to use and (ii) helps us with refiling.  Emacs
will ignore todo keywords _that it knows_ when refiling, but when
started in batch-mode it doesn't know a whole lot.  One would need to
thread the `todoKeywords' through to `refile' and then set
`org-todo-keywords' or a similar variable, which does not sound like a
good experience.  Hence, falling back to showing the todo keyword to the
user when deciding upon a headline sounds acceptable.
2022-10-31 14:29:43 +01:00
Tony Zorman
bdb13e2551 X.P.OrgMode: Add orgPromptRefile[To]
Add orgPromptRefile and orgPromptRefileTo in order to refile entries
after insertion.
2022-10-31 14:29:43 +01:00
Tomas Janousek
c4dca3592e Appease -Werror=type-equality-requires-operators
GHC 9.4 complains:

    The use of ‘~’ without TypeOperators
    will become an error in a future GHC release.
2022-10-30 21:52:10 +00:00
Tony Zorman
c27a1f0791
Merge pull request #770 from slotThe/bikeshed/dynamicproperty
New module: XMonad.Hooks.OnPropertyChange
2022-10-29 14:48:43 +02:00
Tony Zorman
eaab5bfbba New module: XMonad.Hooks.OnPropertyChange
This is the same module as X.H.DynamicProperty, just with (hopefully)
more discoverable names.

Closes: https://github.com/xmonad/xmonad-contrib/issues/588

Co-authored-by: Tomas Janousek <tomi@nomi.cz>
2022-10-29 14:42:48 +02:00
Adam Plaice
2ab520eeda Fix inter-module link (use " instead of ')
Otherwise, haddock tries to link to a (non-existent) function in
"XMonad.Util", which gives a "page not found".

See:

https://haskell-haddock.readthedocs.io/en/latest/markup.html#
linking-to-modules
2022-10-26 21:19:29 +02:00
Tony Zorman
cd95bf9c28 X.P.OrgMode: Return "exitCode" mkOrgPrompt
More formally, return whether the user cancelled the prompt or not.
This is useful in case we want to do things only after a "successful"
input.
2022-10-26 20:25:53 +02:00
Tony Zorman
b9c8294045 X.P.OrgMode: Add mkOrgCfg
This ensures that we always immediately expand the file path upon
constructing an `OrgMode' record.  We thus do not have to do this in
`mkOrgPrompt' anymore.
2022-10-26 20:25:53 +02:00
Tony Zorman
2ffc5de6cf X.U.Run: Don't use elispFun in progn
This is already taken care of by execute and eval, so forcing it in
progn only hampers composability.
2022-10-26 20:25:53 +02:00
Tony Zorman
08071706ba X.U.Run: Add list, saveExcursion 2022-10-26 20:25:53 +02: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
41d6ac96d5 X.H.InsertPosition: Add combinator
Users may not see the warning that insertPosition definitely needs to be
inserted at the leftmost position, which can cause undesired behaviour.
Having a combinator that handles this automatically seems like a sane
idea.

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

       (Note that `docs` wasn't changed since it already inserts itself
       rightmost.)
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
Tony Zorman
05c4c776af
Merge pull request #759 from slotThe/parser/feature-parity
X.U.Parser: Achieve feature parity with ReadP
2022-10-17 17:23:44 +02:00
Tony Zorman
2b1a15c9e5 X.P.OrgMode: Remove pLast
Use the more aptly named `option` instead.
2022-10-17 14:04:43 +02:00
Tony Zorman
0bef428f8f X.U.Parser: Inline definitions
Most of these definitions are probably small enough to be inlined on
their own, but tell GHC to try really hard regardless.  This is commonly
done by other parser libraries as well; e.g., [1], so it shouldn't cause
any issues either way.

[1]: https://hackage.haskell.org/package/parsers-0.12.11
2022-10-17 14:04:43 +02:00
Tony Zorman
4d7ae81f7a X.U.Parser: Feature parity with ReadP
While not many of these more exotic combinators are used right now, it's
still nice to have feature parity (i.e., everything that one could want
from a basic parser) such that people don't have to add their own
combinators, in case they want to use one that's not already
implemented.
2022-10-17 14:04:43 +02:00
exorcist365
4734551c76 X.H.Modal: Remove Keys type alias
This was only used in three places throughout the module and is sort of
non-standard terminology, hence it might confuse users.  Talking about
functions of type

    XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())

is relatively standard in other modules as well, so it's probably best
to remove the type alias for it.
2022-10-14 07:20:42 +02:00
Tony Zorman
865c63a361 X.U.Run: Add executeNoQuote 2022-10-11 19:22:40 +02:00
Tony Zorman
ecd052b7fd
Merge pull request #410 from slotThe/remove-deprecations
Remove (more) Deprecations, Properly Deprecate Modules
2022-10-04 07:10:18 +02:00
alexandersokolow
9e55ae9184 expose more messages in MouseResizableTile layout 2022-09-29 19:43:28 +02:00
L. S. Leary
b9794e6a13 Fix documentation bug in X.U.NSP
The Usage section made reference to a non-existent
`namedScratchpadSpawnAction` function. It has been replaced with
`namedScratchpadAction` in accordance with the documented bindings
below.
2022-09-23 19:21:48 +12:00
slotThe
f02b3a9869 XMonad.Actions.SinkAll: Deprecate 2022-09-22 07:51:52 +02:00
slotThe
3bf9d80c40 XMonad.Layout.Named: Deprecate 2022-09-22 07:51:52 +02:00
slotThe
4a8bd762af XMonad.Hooks.RestoreMinimized: Remove 2022-09-22 07:39:54 +02:00
slotThe
d28c0a2425 XMonad.Layout.LayoutBuilderP: Remove 2022-09-22 07:39:54 +02:00
slotThe
6f49a9394f XMonad.Hooks.ICCCMFocus: Remove 2022-09-22 07:39:54 +02:00
slotThe
287b8bf95f XMonad.Layout.Navigation2D: Remove deprecations 2022-09-22 07:39:54 +02:00
slotThe
d8a23d47bf XMonad.Layout.Spacing: 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
slotThe
6ab4d9c0bc XMonad.Prompt.Window: 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
Tony Zorman
a267fed24f
Merge pull request #757 from slotThe/deprecate-sp
X.U.Scratchpad: Deprecate
2022-09-20 11:54:32 +02:00
Tony Zorman
a44df170f4 X.U.Run: Add findFile 2022-09-19 09:43:42 +02:00
Tony Zorman
2ebbe57bc2 X.U.Run: Quote string in execute and eval
Ordinarily, this should already be the case.  If for some reason it is
not, definitely make sure to quote the input string that we want to
execute.
2022-09-19 09:43:42 +02:00
Tony Zorman
ea16598a78 X.U.Scratchpad: Deprecate
This is i) broken and ii) just the functionality of X.U.NamedScratchpad
rewrapped (and not necessarily improved upon) at this point.

With recent changes to the way named scratchpads work[1], we would have
to export internals of X.U.NamedScratchpad in order to restore
X.U.Scratchpad to its full functionality.  This does not seem worth it,
as the latter does not bring anything substantially new to the table.

Closes: https://github.com/xmonad/xmonad-contrib/issues/756
Related: https://github.com/xmonad/xmonad-contrib/issues/591
[1]: 3fc830aa09368dca04df24bf7ec4ac817f2de479
2022-09-18 17:29:26 +02:00
Tony Zorman
4a3f8eb032 X.U.Font: Add a fallback font to initXMF
In case a font could not be opened, simply fall back to "xft:monospace"
and open that.  The initCoreFont and initUtf8Font functions already have
mechanisms like this, is was just missing from initXMF.

Closes: https://github.com/xmonad/xmonad-contrib/issues/723
2022-09-15 19:02:26 +02:00
Luca Leon Happel
ae652b40f4 X.L.BorderResize: Add borderResizeNear
TODO
The parameter is how many pixels near the border of a window resizing
will be possible
2022-09-10 16:20:35 +02:00
Tony Zorman
5378e93e15 X.D.Extending: Remove keyAddDel and logHook
+ $keyAddDel can just be a side note in $keyDel, it does not need its
  own section.

+ $logHook is covered in more detail in the tutorial and does not serve
  a real purpose anymore.  One could rewrite it to be more in-depth
  about the inner workings of X.H.StatusBar, but for the time removing
  it seems like the best option.

Closes: https://github.com/xmonad/xmonad-contrib/issues/645
2022-09-08 13:09:55 +02:00
Tony Zorman
cedb8d7c78 X.D.Extending: Rewrite keyDel
Nowadays, removing keys is mostly done via removeKeys and removeKeysP,
so the documentation should reflect that fact.  This part is less
step-by-step instructive than the section about adding keys, but read in
succession it presents a way to deepen the newly acquired knowledge.
2022-09-08 13:09:55 +02:00