847 Commits

Author SHA1 Message Date
Ilya V. Portnov
4f2a5c7f43 X.L.Circle: Deprecate in favour of X.L.CircleEx 2023-12-21 19:52:20 +01:00
Ilya V. Portnov
19edf5a7a8 X.L.CircleEx: Init 2023-12-21 19:52:20 +01:00
Tomas Janousek
92a7c030b2 X.L.Renamed: Provide "named" convenience alias
I believe this common use-case for the deprecated X.L.Named should still
be provided somewhere, rather than telling everybody to let-define this
themselves.

The other one – `nameTail` – only has about 6 uses in publicly available
configs (https://github.com/search?q=nameTail+path%3Axmonad&type=code),
so I'm not adding that one but I'm happy to be convinced to add it too.

Related: 3bf9d80c40b9 ("XMonad.Layout.Named: Deprecate")
2023-12-17 21:49:49 +00:00
Tony Zorman
105e529826 Fix partial uses of head
Fixes: https://github.com/xmonad/xmonad-contrib/issues/830
Related: https://github.com/xmonad/xmonad-contrib/pull/836
2023-10-28 11:41:24 +02:00
Tony Zorman
46a26487ba Reduce head usage 2023-10-20 08:13:24 +02:00
Tony Zorman
c3d16bfa99 X.L.Groups: Rewrite gen using infinite streams 2023-10-20 08:13:23 +02:00
Tony Zorman
8ee129483a X.U.Stack: Add zipperFocusedAtFirstOf 2023-10-20 08:13:02 +02:00
Tony Zorman
52a40f376c Replace tail with drop 1
Where appropriate.
2023-10-15 18:46:28 +02:00
Tony Zorman
60867bdd2d X.L.Cross: Deprecate
The module has badly bitrotted, and is in such a state that it's
unlikely anyone is using it currently. Better alternatives exist, so
just deprecating seems appropriate here.

Closes: https://github.com/xmonad/xmonad-contrib/issues/793
2023-10-09 14:32:32 +02:00
Zawaken
a0bfa8a447 X.L.Magnifier: Add magnifyxy
The combinator allows for different magnification to be used in the
horizontal and vertical direction.
2023-08-06 09:28:23 +02:00
Mahdi Seyedan
cf00d2d237 Add CenterMainFluid layout 2023-04-21 10:23:13 -04:00
brandon s allbery kf8nh
87ae269b82 Put a cap on window names
It turns out qutebrowser will place an entire `data:` URL in
`_NET_WM_NAME`, up to at least 389K characters including
newlines and possibly binary characters.

Clamping window titles to the first line, and to 2K chars
because `defaultShrinker` is quadratic in the title length.
2023-04-19 12:53:33 -04:00
L. S. Leary
a52e646cc1 Extract redundant layouts into new module: X.L.FocusTracking
X.L.StateFull's `FocusTracking` and the eponymous `TrackFloating` were
redundant, hence the former was slated for deprecation. However,
the latter and its host module are somewhat poorly named; the layout
modifier has little relation to floats. As such, it's renamed and
rehosted, becoming the eponymous `FocusTracking`.

The redundant offerings in the original modules are redefined in terms
of the new module where possible, and deprecated.

See: #418; comments on #253, #783.
2023-02-12 20:20:52 +13:00
Tomas Janousek
6b20dbca42 Apply hlint 3.5 hints 2023-01-02 20:45:19 +01:00
Tony Zorman
f7e9c0cf0d X.L.ResizableThreeColumns: Fix bottom right window not resizing
...by introducing yet another special case.  Unsurprisingly, this is
just a bandaid—the logic in this module is just wrong.  It
purposefully (not introduced with this change) computes the wrong
positions for certain extreme points such that splitVertically (which
simply goes down the list of stack windows _in order_) still works.

What we should do instead is to either

  - keep track of windows that want to change their size and compute a
    rectangle for them first, or

  - immediately when handling the resize message, compute *all* of the
    new sizes immediately (instead of only for the window getting
    resized).

The latter would force us to keep track of the size of the current stack
we operate in, but since 'handleMessage' lives in X this should not pose
a big problem.  I reckon this is the better approach.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/788
2022-12-31 13:33:36 +01:00
Tony Zorman
e0be851074 X.L.ResizableThreeColumns: Change terminology
For everything, except the exported fields.  Perhaps we should change
these as well, but that's for another commit.
2022-12-31 13:33:36 +01:00
Tony Zorman
b96bb908db Simplify instance declarations
Many instance declarations can now be derived either by DerivingVia or
GeneralizedNewtypeDeriving.
2022-11-20 16:53:36 +01: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
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
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
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
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
slotThe
3bf9d80c40 XMonad.Layout.Named: Deprecate 2022-09-22 07:51:52 +02:00
slotThe
d28c0a2425 XMonad.Layout.LayoutBuilderP: Remove 2022-09-22 07:39:54 +02:00
slotThe
d8a23d47bf XMonad.Layout.Spacing: Remove deprecations 2022-09-22 07:39:54 +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
brandon s allbery kf8nh
f5de0fc764 Document WNConfig
And rearrange the documentation slightly so it makes more sense.
Also document the defaults, and clean up the existing markup a bit.
2022-08-28 01:56:32 -04:00
Tony Zorman
7185b28e09 New module: XMonad.Layout.SideBorderDecoration
New module that allows for having a configurable border position around
windows.  Originally found in a comment by L. S. Leary in [1].  Enough
people have requested this on IRC in recent memory to warrant a proper
module.

[1]: https://github.com/xmonad/xmonad/issues/152#issuecomment-362716434

Co-authored-by: L. S. Leary <LSLeary@users.noreply.github.com>
2022-08-19 09:43:02 +02:00
Tony Zorman
ee97eec17d Remove all remaining occurences of defaultTConf
Data.Default deprecations were removed in
5140f5b5d06790e055eb7fb0cf3eccc4997aa736, yet some comments still refer
to defaultTConf—fix that.

Related: 6b4675e3fa85f95f808a95f8cad790e798cf6ad5
2022-08-03 10:06:23 +02:00
brandon s allbery kf8nh
6b4675e3fa
fix some deprecated and removed defaultTConfs 2022-08-02 19:37:18 -04:00
Jon Roberts
accea5b1d8 X.L.CenteredIfSingle: Allow specifying ratio in both dimensions
While monitors are, more often than not, wider than they are high,
specifying a ratio in the vertical direction can also make sense; e.g.,
when flipping a monitor by 90 degrees.  Thus, we should definitely
support both.
2022-06-21 13:16:50 +02:00
brandon s allbery kf8nh
67243cbf7c
the rest of the fix for #719
It's just two more exports.
2022-05-08 09:27:56 -04:00
brandon s allbery kf8nh
41674386a6
Export shrinkText
Closes #719.
(This being a trivial one-line change and the description being already bigger than the change, I'm committing it directly.)
2022-05-08 09:06:18 -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
slotThe
dcd5918d3a X.L.ThreeColumns: Resize screenshot
Fixes: https://github.com/xmonad/xmonad-contrib/issues/530
2022-03-06 20:23:15 +01: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
Tomas Janousek
253b952814 X.L.SubLayouts: Document assumptions/pre-conditions of toGroupStack
This started as an investigation/fix of xmonad freezing when a bug in
X.A.DynamicWorkspaces caused duplicate Windows in a single Workspace
Stack, but I soon(-ish) realized that trying to make SubLayouts robust
enough to handle duplicities in a Stack is futile. Any code that creates
duplicities in a Stack is buggy, and must be fixed; the rest can assume
there aren't any.

Instead, let's just document that this is a pre-condition, and that (and
how) stuff will misbehave.

Related: https://github.com/xmonad/xmonad-contrib/issues/565
2022-02-20 18:22:19 +00:00
Tomas Janousek
a6c048899c X.L.SubLayouts: Use ScopedTypeVariables as intended years ago
We don't need to support GHC 6.8.2 any more. :-)
2022-02-20 18:22:19 +00:00
Tomas Janousek
c4d718be9a X.L.VoidBorders: Improve doc a bit 2022-02-01 18:39:33 +00:00
rayes
a3012eaa27 X.L.VoidBorders: Add ability to reset borders for certain layouts 2022-01-30 21:07:46 -07:00
slotThe
478393fb7d Deprecate user and abandoned modules
Now that the user configs are on the website, it is time to deprecate
them.  At the same time deprecated X.C.Monad, which hasn't been updated
since 2008 and X.C.Prime, which has confused users quite recently,
thinking it to be a better starting place.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/677
Fixes: https://github.com/xmonad/xmonad-contrib/issues/595
Related: https://github.com/xmonad/xmonad-web/pull/49
2022-01-14 07:58:18 +01:00
Samuli Thomasson
508586bf44
X.L.BinarySpacePartition: Ignore minimized windows
Hidden windows are now ignored by the layout so that hidden windows in
the stack don't offset position calculations in the layout.

Also in X.H.ManageHelpers: added `isMinimized`
2021-12-28 22:33:52 +01:00
brandon s allbery kf8nh
d65cf05369 warn about using avoidStruts with gap modifiers 2021-12-22 16:41:30 -05:00
brandon s allbery kf8nh
2cf0a10f5b warn about use of avoidStruts with spacing modifiers 2021-12-22 16:38:11 -05: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
d3adb5
97beb3efc7
X.L.MagicFocus: always use focused as master
Instead of searching for the currently focused window across workspaces,
make it so there is never any window above focus on the Stack that is
given to the modified layout.

Closes #657.
2021-11-28 02:04:22 -03: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