79 Commits

Author SHA1 Message Date
Simon Hengel
30d3f7159b
Add recompilation support via cabal 2024-12-21 21:57:58 +07:00
brandon s allbery kf8nh
a58ccac7ba restore the main loop
The ghc versions affected by the join point bug are long obsolete
and should not be being used by anyone.

This partially reverts #404.
2024-07-29 14:20:35 -04:00
Tony Zorman
c3acee78d0 Bump version to 0.18.0.9 2024-02-03 18:41:41 +01:00
Tony Zorman
1396343a58 Bump version to 0.18.0 2024-02-03 16:01:11 +01:00
iogrt
0156e2963b X.Operations: Add unGrab 2023-11-20 19:30:47 +01:00
Ivan Malison
67b5510dde Add nix recompilation support 2023-10-07 11:41:58 +02:00
Tomas Janousek
69134f9e8a X.Operations: Apply size hints in floatLocation
This is hopefully harmless with well-behaved clients and ordinary xmonad
configs, and it enables using re-floating to apply size hints to
existing windows. The only visible behaviour change I can foresee is
that tiled windows (which ignore hints by default, unless
X.L.LayoutHints is used) will now snap to size hints whenever they're
floated (either via a keybinding or on mouseMoveWindow), whereas
previously they'd only do so on mouseResizeWindow.

My use-case for this is the following: when I change fonts in my
terminal, it updates its size hints and then sends a
ConfigureRequestEvent to change its size to keep the number of rows and
columns the same, and it also happens to reset the position to 0, 0. If
it's tiled, that request is just ignored and hintsEventHook handles the
layout refresh. If it happens to be floating, I want neither the move to
0, 0 nor the window size change to keep rows/colums, so I have a
handleEventHook that ignores that ConfigureRequestEvent and just
refloats the window, but I need a way to reapply size hints.

I could add a separate function that applies these hints to the floating
RationalRect, but that seems like a lossy operation due to the Doubles
in there. So I'd probably end up replicating most of the code from
floatLocation, and then I might just improve that instead… :-)

(I'll submit that custom ConfigureRequestEvent-ignoring hook to
xmonad-contrib later.)
2023-05-20 08:34:07 +02:00
brandon s allbery kf8nh
64fbf6a09d
Move willFloat to 0.17.1
Since it's a short doc change, I'm committing directly after verifying the preview is correct.
2023-05-01 10:00:00 -04:00
L. S. Leary
5ee76ca48f Let the current screen win in the fight for dupes
`windows` generates mappings one screen at a time, starting with the
current. Tracking the windows it's already generated mappings for,
it excludes them from the tiles under consideration, hence supporting
window duplication in a first-biased manner. This allows the current
screen to win against any contenders and keep duplicated tiles within
reach.

However, it neglects to extend this treatment to floats; they end up
mapped in a last-biased manner. Consequently, duplicated floats become
very slippery, escaping to any inactive screen they can. This change
rectifies that issue.

See: xmonad/xmonad-contrib#797
2023-04-04 00:26:44 +12:00
Tony Zorman
19cba6b25f Merge branch 'release-v0.17.2' of https://github.com/xmonad/xmonad into after-0.17.2 2023-04-02 15:17:55 +02:00
Tomas Janousek
5641038500 CHANGES: Fix typo 2023-04-02 13:26:11 +02:00
Tony Zorman
a207e30751 CHANGES.md: Add changes for 0.17.2 2023-04-02 10:39:43 +02:00
Tony Zorman
5c7c28060c ci: Drop support for GHC 8.4
Debian stable is not on 8.6, which was always our guide as to which GHC
versions we want to support.

In particular, this lets us get rid of all the quickcheck-classes
special treatment.

Related: 400730fe3b
2022-11-19 09:29:37 +01:00
damhiya
314390937c X.Layout: Don't draw zero-area windows in Tall 2022-11-10 15:52:39 +01:00
Tony Zorman
3d8238b35d Expose buildLaunch, sendRestart, and sendReplace
+ Move sendRestart and sendRestart to X.Operations, as this seems like a
  better fit.

Closes: https://github.com/xmonad/xmonad/issues/416
2022-09-10 10:27:26 +02:00
Tomas Janousek
b771abeadc Bump version to 0.17.1.9 and prepare CHANGES.md sections 2022-09-03 16:21:52 +01:00
ernestkz
0f31b24bd2 CHANGES.md: Fix date. 2022-09-03 15:37:32 +01:00
Tony Zorman
488b52ffaa Bump version to 0.17.1 2022-09-03 14:47:26 +02:00
brandon s allbery kf8nh
8965e41d06 attempt to work around the join point bug (#389) 2022-08-04 08:44:50 +02:00
Tony Zorman
bf6e66b100 X.Operations: Export setNumlockMask, grabKeys
As discussed in xmonad/xmonad-contrib/#703, certain functions that
X.U.Grab has vendored should really just be exported from core.

Related: https://github.com/xmonad/xmonad-contrib/pull/703
2022-08-01 11:59:37 +02:00
brandon s allbery kf8nh
1695aeb28a
Revert "Revert "CHANGES: Add missing entry for #350""
This reverts commit 29475fa7f8f04dcb68913b78bffcdfa2e99ee33a.

xmonad/xmonad-contrib#731 fixes the WindowNavigation issue with alpha
channels, so we can re-enable alpha support. A subsequent commit will
bump versions/dependencies to keep things in sync, although strictly
speaking that's not necessary here.
2022-07-05 17:50:17 -04:00
Tomas Janousek
29475fa7f8 Revert "CHANGES: Add missing entry for #350"
This reverts commit c537a0658a3b9ec25cb1ce108d3cdd3dce27f111.

A discussion of why, as well as a new way forward, in being discussed in

    https://github.com/xmonad/xmonad/issues/395

However, since we would like to release a new minor version soon-ish,
it's better to revert this for now.

Fixes: e5a258f19c0a ("Revert "Merge pull request #350 from Thiago4532/opaque-window-border"")
2022-06-19 16:54:29 +01:00
Tomas Janousek
c537a0658a CHANGES: Add missing entry for #350 2022-02-01 18:09:12 +00:00
Andrea Berlingieri
b6af6bb86a Add function to detect floating windows in ManageHook
Add a willFloat function to deteect whether the managed window will be
floating or not

Add description of added change to CHANGES.md
2022-01-22 21:56:53 +01:00
slotThe
79278d9475 X.Operations: Use custom cursor for dragging/resizing
When dragging and resizing windows, users may expect the cursor to
change to indicate the respective behaviour.  In particular, many other
window managers already do this [1] [2].

Thus, introduce a new (non-exported) `mouseDragCursor` function that
takes a cursor shape and change the generic resize and move functions to
use that.  The reason that we don't change `mouseDrag` itself (for now)
is that this is exported and quite a few contrib modules use it—breaking
compatibility with xmonad-0.17.0 so soon after the release seems unwise.

Fixes: https://github.com/xmonad/xmonad/issues/348

[1]: https://git.suckless.org/dwm/file/dwm.c.html#l1567
[2]: 7a8fa9d27a/lib/awful/mouse/resize.lua (L23)
2021-11-25 09:12:22 +01:00
Tomas Janousek
6c92dd22ad Bump version to 0.17.0.9 and prepare CHANGES.md sections
We need to bump the version early to avoid overwriting
https://xmonad.github.io/xmonad-docs/xmonad-0.17.0/
2021-10-28 18:05:15 +01:00
Tomas Janousek
a204c9ed04 Bump version number (0.17.0), update date in changelog/manpage 2021-10-27 16:57:14 +01:00
slotThe
79afdfbbb9 CHANGES.md: Sectionise 0.17.0 changes
Create three sections (enhancements, bug fixes, breaking changes) in
order to organise the changes for the v0.17.0 release.

As discussed in [1], the breaking changes really aren't breaking changes
to normal users.  The only exception could be the GenerateManpage
change, but even that is only important for distro maintainers.  Hence,
move all of these to the very back, such that we can mention exciting
features like the stack integration at the top instead.

Related: https://github.com/xmonad/xmonad/pull/340

[1]: https://github.com/xmonad/xmonad/pull/340#discussion_r734956547
2021-10-24 08:18:42 +02:00
Tomas Janousek
60f36e78ba CHANGES: Prepare version number and approx. date for release 2021-10-23 16:06:06 +01:00
slotThe
4e30ef13a7 Update CHANGES.md 2021-10-17 10:13:00 +02:00
Tomas Janousek
33a86c0cdb X.Operations: Fix mouse in Tabbed decorations (revert broadcastMessage refactor)
Turns out there was another aspect of `broadcastMessage` behaviour that
I missed in my review of the refactor: X.L.Tabbed updates the windowset
during handleMessage (via `X.O.focus`) and expects that change to
persist (by returning `Nothing` and hoping no other layout or layout
modifier returns `Just`). That's quite a hack, but the LayoutClass
interface doesn't allow a cleaner way to do this (well, some extensible
state plus a custom event hook might work, but then the layout isn't
self-contained any more).

And since rereading workspace layouts during `modifyLayouts` would force
this back into O(n²), we might as well revert the whole refactor. :-/

Fixes: https://github.com/xmonad/xmonad/issues/329
2021-09-14 11:25:18 +01:00
Tomas Janousek
ebce32d891 Minor cleanups of Solomon's PR 2021-09-14 11:08:48 +01:00
Solomon Bothwell
b3bd9c90d1 Adds withUnfocused function to XMonad.Operations 2021-09-13 23:00:37 -07:00
Tomas Janousek
11d76e284c Adjust runOnWorkspaces processing order
We now use this in `broadcastMessage`, so to not change which workspaces
get the message first, we need to change the order here. This wouldn't
normally be safe to do either, but there are no other uses of
`runOnWorkspaces` neither here nor in xmonad-contrib, so it should
actually be fine.
2021-09-04 18:04:49 +01:00
Tomas Janousek
ae97c1f107 CHANGES: Mention recompilation improvements 2021-08-17 10:46:07 +01:00
Tomas Janousek
9813e218b0 Move config binary and GHC intermediate outputs to cacheDir
That's where they belong. As XDG was more or less broken in previous
xmonad releases, we can assume few people use it so now's the best time
to move files around.

For users of `~/.xmonad`, this only causes intermediate outputs (.o,
.hi) to go elsewhere.

Fixes: https://github.com/xmonad/xmonad/issues/178
2021-08-17 10:46:07 +01:00
Yecine Megdiche
92d01e37a0 Broadcast DestroyWindowEvent to layouts
Some layout and layout modifiers that keep track of some window
properties don't do garbage collection and update their state when
windows are destroyed. By broadcasting this event, it should be easier
for layouts to clean up

Related: https://github.com/xmonad/xmonad-contrib/pull/474
2021-07-31 15:24:31 +01:00
Matt Zrinsky
1a4c95fac8 Add help command to help message.
Attempt to contribute to xmonad,
and add a simple line to the help message,
containing the help command itself.

Fixes xmonad/xmonad#287
2021-07-02 13:58:00 -05:00
slotThe
5b064f474d Update CHANGES.md 2021-06-04 18:17:11 +01:00
Tomas Janousek
d620639f7d Add support for extensible config in contrib modules
It's often difficult to make contrib modules work together. When one
depends on a functionality of another, it is often necessary to expose
lots of low-level functions and hooks and have the user combine these
into a complex configuration that works. This is error-prone, and
arguably a bad UX in general.

This commit presents a simple solution to that problem inspired by
"extensible state": extensible config. It allows contrib modules to
store custom configuration values inside XConfig. This lets them create
custom hooks, ensure they hook into xmonad core only once, and possibly
other use cases I haven't thought of yet.

For more, see the related pull request to xmonad-contrib.

Related: https://github.com/xmonad/xmonad-contrib/pull/547
2021-05-17 17:46:48 +01:00
Tomas Janousek
56f810d182 GenerateManpage: Drop all dependencies except base and invoke in CI
pandoc's API changes often enough that distros like Debian were patching
our GenerateManpage.hs to work with their version of pandoc, and it
doesn't build against any Stackage LTS except the recently released
LTS-17. Also, building pandoc from source takes quite some time and
resources.

But for what benefit? We're not using any special pandoc functionality
whatsoever. It's just that it was all in Haskell and the entire build
was orchestrated by cabal, but is all that complexity and resource
consumption worth it? I think not.

(Frankly, this whole thing was just a massive waste of time as the help
text in Config.hs isn't generated at all, so we still need to do this
manually. And then, the default key-bindings in core are unlikely to
change ever again.)

Let's simplify this:

* drop all dependencies except base and just run it through runhaskell

* add a Makefile and GH Actions workflow that invokes this after push

* only ship the results in release tarball, not the scripts which are
  considered our dev infrastructure

Closes: https://github.com/xmonad/xmonad/issues/283
Related: https://github.com/xmonad/xmonad/pull/260
Related: https://github.com/xmonad/xmonad/pull/261
Related: https://github.com/xmonad/xmonad/pull/265
Related: https://github.com/xmonad/xmonad/pull/266
Related: https://github.com/xmonad/xmonad/pull/267
Related: https://github.com/xmonad/xmonad/pull/268
2021-04-27 11:05:32 +01:00
Tomas Janousek
910d99cb74 Update CHANGES 2021-04-03 17:13:25 +01:00
Tomas Janousek
b9ce5b034b Fix obscuring notifications when moving floats
Since 4565e2c90ef5, not only do we raise the floating window to top when
starting dragging, we also restack all other managed windows directly
below it (mouse{Move,Resize}Window now call `float` while dragging,
which invoke `windows` and that restacks all windows). This means that
as soon as we start dragging, all xmonad-managed windows are raised to
the top, obscuring any unmanaged (override-redirect) windows that were
at the top before.

The good thing about 4565e2c90ef5 is that since we refloat and refresh
on every mouse move while dragging, we no longer need the `raiseWindow`.
It was probably only there so that it stays visible when dragging
between Xinerama screens (3cb64d74617), and that's taken care of by
refloating the window on every move. As the refresh restacks everything
anyway, the only function of the `raiseWindow` is to stack windows above
unmanaged ones, which is likely undesirable.

There is still one known issue related to obscuring notifications:
https://github.com/xmonad/xmonad/issues/89
That one is caused by X opening new windows at the top of stacking order
and xmonad then restacking all other windows directly beneath them if
the new window is in the master position of the stack. Some notification
daemons like dunst work around this by raising themselves whenever a new
window is opened
(77bfbc4f7f/src/x11/x.c (L348)).
Fixing this one is considerably more complicated as we'd need to keep
track of (unmanaged) windows that wish to be stacked above new windows,
therefore this won't be addressed here, and probably won't be addressed
in xmonad core ever.

Fixes: https://github.com/xmonad/xmonad/issues/208
Fixes: 4565e2c90ef5 ("fix #63: window jumping to origin position when dragging")
2021-02-16 12:00:28 +00:00
Keith
f5bd77a7f8 made ScreenDetail a newtype and RationalRect strict in its contents. 2021-01-19 12:06:07 -05:00
slotThe
70a75e5e3f Update documentation 2021-01-07 17:25:30 +01:00
Vanessa McHale
ec1c3e0159 update changelog 2020-12-31 20:19:10 -06:00
slotThe
b3c860b892 Rename LR to CLR
Some modules in xmonad-contrib define their own LR type with L and R as
data constructors, leading to build failures; this fixes that.
2020-12-13 17:23:14 +01:00
Felix Springer
30f2d9f325
Merge branch 'master' into master 2020-12-08 16:41:36 +01:00
Tomas Janousek
6dc1e319d1 Make layouts Typeable
This makes it possible to query the current layout state, which might be
useful to e.g. show the current X.L.WorkspaceDir in xmobar.

Example of use (assuming myLayout is the layout that is assigned to
layoutHook):

    asMyLayout (Layout l) = (`asTypeOf` myLayout) <$> cast l

    …

    layout <- asMyLayout . W.layout . W.workspace . W.current <$> gets windowset
    case layout of
        Just (WorkspaceDir d) -> …

Unfortunately this requires adding the Typeable constraint to a bunch of
classes in xmonad-contrib, so we need to merge those changes there first
(fortunately it doesn't need to go in lockstep, adding a Typeable
constraint to those classes in xmonad-contrib is harmless).
2020-11-04 15:28:04 +00:00
Tomas Janousek
f8b243b66e Use current screen to set dimensions of new floating windows
This fixes a bug when using multiple screens with different dimensions,
causing some floating windows to be smaller/larger than the size they
requested.

Some applications (e.g. pinentry) always map their window at (0, 0) so
floatLocation would compute the window size relative to the screen
containing (0, 0) and if the current workspace is on another screen with
a different size, this relative size results in a different absolute
size, which is undesirable for fixed size floats.

Other applications like ssh-agent place their window at the center of
the framebuffer (ignoring xinerama layout). Same problem.

Then there are apps that remember their position/size when minimizing to
tray and then attempt to restore it when reopened. Again, if they
restore it on another screen, we miscalculate the size.

The fix is to use the current screen for calculating dimensions of new
(not yet mapped) floating windows.

Co-Authored-By: Vincent Vinel <narthorn@gmail.com>
2020-05-13 20:11:32 +02:00