Commit Graph

1711 Commits

Author SHA1 Message Date
slotThe
a5b6e09985 INSTALL.md: Remind users to check which xmonad
We have had this situation happen a few times now: users update
xmonad (say, to 0.17.0) but forget that they still have an older version
installed via the distributions repositories.  Features that depend on
the "bootstrap" xmonad executable to be updated (like the improved XDG
support) then fail badly.

Thus, remind users to check whether the right executable is present.
2021-11-20 11:26:18 +01:00
Thiago Mota
bb448cc293 X.Operations: Make window borders opaque 2021-11-18 19:53:05 -03:00
slotThe
ae4c5e26be MAINTAINERS.md: Add PGP key for slotThe
Also, move the bullet point to the end so as to keep the list
alphabetically ordered.
2021-11-17 19:34:38 +01:00
slotThe
54df2e9acd INSTALL.md: Mention more packages as dependencies for Arch
At least on Arch, none of the listed packages necessarily require that
the user has a working Xorg setup—this has already caused some confusion
for people.  In particular, xmessage is very much needed in order to
show warnings and compilation errors.
2021-11-14 13:26:34 +01:00
Tomas Janousek
7f6d758ce5 MAINTAINERS: Update the Hackage release step 2021-11-08 18:15:07 +00:00
Tomas Janousek
9f64c2ca90 ci: Show error body from Hackage when it fails
Prevents having to upload the candidate manually to see what's wrong.
2021-11-08 18:14:52 +00:00
Tomas Janousek
9849800dc5 ci: Swap candidate/final release logic
During the release of xmonad 0.17.0, I realized that we need to be able
to upload candidates before tagging the release on GitHub, because there
might be issues with the tarball and Hackage may reject it. When that
happened, I had to remove the release, delete the tag, upload the
candidate manually to see what's wrong with it, try to fix it, upload it
manually again, and so on.

This commit swaps the logic: when the workflow is invoked manually, it
uploads the candidate. This can be done multiple times, and once
everything is fine, the release can finally be tagged and it's released
to Hackage proper. The only disadvantage is that we need to remember to
try uploading the candidate. Not sure if there's a perfect solution…
2021-11-08 18:13:23 +00:00
Tomáš Janoušek
a902fefaf1 Merge pull request #346 from liskin/ghc92
Test against GHC 9.2.1; fix new warnings
2021-11-04 11:05:14 +00:00
Tomas Janousek
0f708e76b1 Fix -Wnoncanonical-monad-instances, -Wnoncanonical-monoid-instances 2021-10-31 11:53:42 +00:00
Tomas Janousek
6e6f562b0d Fix Pattern match(es) are non-exhaustive warnings
Many of these are legitimate, like the one in rescreen where it really
can be empty and xmonad might crash. Or the one in Main, where using an
irrefutable pattern means a pattern-match failure isn't reported using
the MonadFail instance of IO, but is left to crash later when the thunk
is evaluated.

Others are just GHC not knowing it won't crash, and we can use
Data.List.NonEmpty to tell it.
2021-10-31 11:41:53 +00:00
Tomas Janousek
12d1b31d6c ci: Test against GHC 9.2 2021-10-31 11:04:27 +00:00
Tomas Janousek
b92bd28d97 ci: Update haskell-ci 2021-10-31 10:52:58 +00:00
Tomáš Janoušek
e1daf46c75 Merge pull request #344 from slotThe/dont-print-getWindowAttributes
X.Operations: Silently catch in setWindowBorderWithFallback
2021-10-29 12:24:30 +01:00
slotThe
a8e1249ba7 stack: Bump default resolver to 18.14
No impact on CI, just makes it easier for contributors to use the latest
8.10 GHC.

Related: xmonad-contrib@f5f6ef41cb6cce3ba14957c31640f10b5751c90c
2021-10-29 11:00:04 +02:00
slotThe
e3824687c7 X.Operations: Silently catch in setWindowBorderWithFallback
While we catch the exception that `getWindowAttributes` can throw in
`setWindowBorderWithFallback`, we immediately turn around and print the
error to stderr.  Since this exception is raised every time a window is
closed[1] , it clutters stderr and may even confuse users as to why
xmonad is throwing these exceptions.

[1]: Depending on how the window is closed, we either have no way of
running `windows` on our own (say, the window is closed by a keybinding
of the program itself), or the focus change (and thus the call to
`windows`) runs before we can handle the DestroyWindowEvent.
2021-10-29 09:43:13 +02:00
Tomas Janousek
c979ee67c0 MAINTAINERS: Update release procedure (dev version bump, …) 2021-10-28 18:06:13 +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
slotThe
66ac855959 TUTORIAL.md: Fix link for Libera webchat
The kiwiirc webchat was superseded by one hosted directly by the Libera
project.
2021-10-27 19:22:30 +02:00
Tomas Janousek
7fab71f5f0 xmonad.cabal: Specify default-language
Required for cabal-version >= 1.10
v0.17.0
2021-10-27 17:55:00 +01:00
Tomas Janousek
055dce10af Bump cabal-version in xmonad.cabal
Hackage won't accept the release otherwise.
2021-10-27 17:48:44 +01:00
github-actions
292f19eab8 man: Update 2021-10-27 15:57:55 +00:00
Tomas Janousek
a204c9ed04 Bump version number (0.17.0), update date in changelog/manpage 2021-10-27 16:57:14 +01:00
Yecine Megdiche
78f1a8e716 CONTRIBUTING: Drop xmonad-testing
xmonad-testing isn't really being used, so the wording needs to be
changed in CONTRIBUTING.md and in the PR template. The important thing:
we want an example for new modules/functionality, and appropriate tests.

Related: https://github.com/xmonad/xmonad/issues/341
2021-10-27 16:50:10 +01:00
slotThe
72794d92b1 TUTORIAL.md: Rename versions 0.17 -> 0.17.0 2021-10-27 12:03:14 +02:00
slotThe
546d0b5ddb TUTORIAL.md: Remove note about 0.17.0 not being released
:)
2021-10-27 12:01:06 +02:00
slotThe
a03b6e86de CONTRIBUTING.md: Refer to pedantic
Instead of manually compiling with `-Wall -Werror` and the like, we have
a `pedantic` flag in xmonad's cabal file with which to run the CI.
Since contributors are very unlikely to not use either stack or cabal to
build xmonad, we should refer them to this flag instead of listing all
of the options they would need to compile xmonad with in order to check
their work.

Fixes: bc8f7ff133
2021-10-25 09:14:06 +02:00
Tomas Janousek
856c8b2c8d Merge branch 'packdeps' 2021-10-24 17:19:36 +01:00
Tomas Janousek
dbd441cc1b MAINTAINERS: Update release procedure 2021-10-24 17:08:10 +01:00
Tomas Janousek
2e89e5ed23 Bump lower bound for base
We only test with GHC 8.4+ so it's unlikely this builds with older base
(Semigroup stuff …).
2021-10-24 17:08:10 +01:00
Tomas Janousek
0ebedbb533 ci: Check package bounds using packdeps once a week
This was a part of the release procedure but we should do it proactively
instead.

Related: https://github.com/xmonad/xmonad/issues/264
2021-10-24 17:08:10 +01:00
Tomas Janousek
c2a1a3c0a6 ci: Add Stackage LTS 18 to Stack test matrix 2021-10-24 17:08:10 +01:00
Tomas Janousek
7d10e470d7 ci: Avoid caching GHC
We install GHC using apt, so stack shouldn't install it, but should it
ever end up installing it anyway (version mismatch, version unavailable
in hvr/ghc ppa, …), we don't want it wasting valuable cache space.
2021-10-24 17:08:10 +01:00
slotThe
6608f0012b CONTRIBUTING.md: Mention IRC/matrix before mailing list
Nowadays, the IRC and (since it is linked to it) matrix channels are
much faster ways to get into contact with us than the (very low traffic)
mailing list.  CONTRIBUTING should reflect that, since especially new
contributors might not know where to go to get a feeling for the people
working on the project—or worse, think we only communicate via pull
requests and issues!
2021-10-24 17:43:45 +02:00
slotThe
bc8f7ff133 Move STYLE to CONTRIBUTING.md
Style guidelines should be where most people will see them.  Since we
already ask people to read CONTIRBUTING.md when they submit a pull
request, putting them in there seems like the best place.

We can also drop the curious "or freer" clause from the licensing point,
much like xmonad-contrib@f39218ddb5ffeddce90f620910d5ef2c14f2b43d
already did.
2021-10-24 17:43:45 +02:00
slotThe
7845145706 Delete CONFIG
CONFIG has been completely replaced by TUTORIAL.md and it might be quite
confusing for new users if we keep two tutorials around.
2021-10-24 17:38:13 +02: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
Tomáš Janoušek
8774081c15 Merge pull request #340 from liskin/readme
README: Long overdue update
2021-10-23 16:06:42 +01:00
Tomas Janousek
60f36e78ba CHANGES: Prepare version number and approx. date for release 2021-10-23 16:06:06 +01:00
Tomas Janousek
b198b80559 README: Long overdue update
* add logo and badges to make it prettier
* revamp installation sections
* update xmonad-contrib reference and move upwards
* drop other useful programs, this is in download.html
* add new Contributing section

Fixes: https://github.com/xmonad/xmonad/issues/199
2021-10-23 00:17:30 +01:00
Tomas Janousek
6bbd8b869e Update .mailmap with even more info from xmonad-contrib
The lesson here is that stuff like this should not be done manually.
For future reference, here's the machinery I ended up using:

    https://gist.github.com/7b78eba396024d4f56fa217867e2a3a8
2021-10-22 23:05:48 +01:00
Tomas Janousek
97aeb8577c LICENSE: Fix wording to make it detectable by GitHub 2021-10-22 22:55:47 +01:00
Tomas Janousek
0be6d2bec5 Update .mailmap with additional info from xmonad-contrib's
+ some Googling.

If the archaeologists ever come, we're ready for them. :-)
2021-10-21 15:33:12 +01:00
Tomas Janousek
b1fef9b18c Add .mailmap to clean git shortlog 2021-10-21 11:39:46 +01:00
slotThe
b5b95e27ce Merge pull request #337 from slotThe/lazy-lifted-boolean-ops
Make `(<&&>)` and `(<||>)` lazy in their second argument
2021-10-17 10:14:02 +02:00
slotThe
4e30ef13a7 Update CHANGES.md 2021-10-17 10:13:00 +02:00
slotThe
d92125485a X.ManageHook: Make (<&&>) and (<||>) lazy in their second argument
While an implementation of `liftM2 (&&)` may seem like a straightforward
lift of `(&&)` into a monadic setting, it actually expands to

    (<&&>) :: Monad m => m Bool -> m Bool -> m Bool
    mb <&&> mb' = do
      a <- mb
      b <- mb'
      return (a && b)

which runs both monadic effects first and then applies `(&&)`.

This is fixed by introducing a monadic version of `if-then-else` (which
is also exported due to its usefulness) that checks the second result
only if this is explicitly necessary.
2021-10-16 16:33:04 +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
Tomáš Janoušek
3bb653bf9c Merge pull request #327 from ssbothwell/feature/withFocused-function
Adds withUnfocused function to XMonad.Operations
2021-09-14 11:09:42 +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