Commit Graph

1531 Commits

Author SHA1 Message Date
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
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
Tomáš Janoušek
5da25c5413 Merge pull request #291 from wygulmage/refactor_message_handling
added export list to Operations, refactored message handling.
2021-09-04 18:11:10 +01: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
6d661203d3 Rename updateLayoutsBy to modifyLayouts
More consistent with our existing naming.
2021-09-04 18:01:36 +01:00
Tomas Janousek
30c2eeeeb3 Revert "changed order of broadcastMessage to match original."
We'll adjust runOnWorkspaces instead.

This reverts commit 5eff329fc6.
2021-09-04 17:54:17 +01:00
Tomas Janousek
d66e71d464 Revert "generalized signature of updateLayoutsBy"
This reverts commit eb48bb4aef.
2021-09-04 17:54:06 +01:00
Tomas Janousek
5c7e61def2 X.Operations: Small cleanup of module header 2021-09-04 17:52:01 +01:00
Keith
eb48bb4aef generalized signature of updateLayoutsBy 2021-09-04 17:52:01 +01:00
Keith
5eff329fc6 changed order of broadcastMessage to match original.
This uses two new functions (not exported):
`workspacesA` traverses the workspaces in a StackSet.
`runOnWorkspaces` runs `workspacesA` with the X state.
2021-09-04 17:52:01 +01:00
Keith
183e14725f changed broadcastMessage to be O(workspaces).
The current definition of broadcastMessage seems to be O(n^2) in the number of workspaces because it uses sendMessageWithNoRefresh and sendMessageWithNoRefresh uses updateLayout and updateLayout uses runOnWorkspaces.

This changes broadCastMessage and sendMessageWithNoRefresh to each use a single
call to runOnWorkspaces.
2021-09-04 17:52:01 +01:00
Keith
0ab42d4228 added export list to Operations.
This includes Haddock sections that will make the documentation render differently.
2021-09-04 17:52:01 +01:00
Keith
52a5e7ca8c updated documentation of Operations.
Added missing documentation for type alias `D`.

Moved misplaced documentation.

Edited to a consistent style that will play well with Haddock.
2021-09-04 17:46:05 +01:00
Tomas Janousek
f89df98f40 Drop unused import System.Environment (setEnv)
Fixes: 30719202b9 ("Fix xmessage in non-UTF-8 locales")
2021-08-30 18:04:23 +01:00
Tomas Janousek
30719202b9 Fix xmessage in non-UTF-8 locales
`executeFile` encodes the arguments with the current locale's encoding,
and GHC as invoked during recompilation quite likely also outputs any
errors in the locale encoding, which we then read using `readFile` again
decoding in the locale encoding, so it really makes no sense to force a
specific encoding here. What was I thinking? :-)

Related: https://github.com/xmonad/xmonad/issues/322#issuecomment-900503386
Fixes: https://github.com/xmonad/xmonad/issues/324
Fixes: aa35ea1856 ("Make xmessage handle UTF-8 and export it")
2021-08-30 17:45:47 +01:00
Tomáš Janoušek
aa18707c3e Merge pull request #323 from MuhammedZakir/master
Add `--stack-yaml` flag to `stack build --silent`
2021-08-17 19:09:57 +01:00
MuhammedZakir
b77ba03ed9 Add --stack-yaml flag to stack build --silent
Fixes: https://github.com/xmonad/xmonad/issues/322
2021-08-17 23:02:45 +05:30
Tomáš Janoušek
be1d2269ce Merge pull request #318 from liskin/stack-recompile
Recompilation overhaul: stack.yaml detection, deprecation warnings
2021-08-17 10:55:38 +01:00
Tomas Janousek
7bdc7ab9dc Print the recompilation command into the error file
When `stack build --silent` fails, the output is not helpful at all:

    Errors detected while compiling xmonad config: /home/slot/.config/xmonad/xmonad.hs
    ExitFailure 1

    Please check the file for errors.

And even in other circumstances it's helpful to see the command that was
executed, as it makes it easy for the user to diagnose what's wrong.
2021-08-17 10:46:07 +01:00
Tomas Janousek
ae97c1f107 CHANGES: Mention recompilation improvements 2021-08-17 10:46:07 +01:00
Tomas Janousek
782ac25b8e INSTALL: Update after stack.yaml autodetection
Related: https://github.com/xmonad/xmonad/issues/310
2021-08-17 10:46:07 +01:00
Tomas Janousek
8aa0d4a3e0 Detect deprecation warnings during recompilation and warn the user
Deprecation warnings were suppressed during recompilation, which made it
difficult to improve things in the codebase and API as users did not
(know they) have a transition period to adapt their configuration.

See additional discussions about deprecations:

 - https://github.com/xmonad/xmonad-contrib/pull/404#issuecomment-731607447
 - https://github.com/xmonad/xmonad-contrib/pull/410#issuecomment-732841235

Fixes: https://github.com/xmonad/xmonad/issues/304
Related: https://github.com/xmonad/xmonad-contrib/pull/404
Related: https://github.com/xmonad/xmonad-contrib/pull/410
2021-08-17 10:46:07 +01:00
Tomas Janousek
1f8e5b43e1 Fix indent in getDirectories
Fixes: 90101613e7 ("Unclobber dirs/Dirs in import XMonad")
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
Tomas Janousek
403e4df624 Use "stack ghc" for recompilation when stack.yaml exists
This makes it unnecessary for users of Stack to use a custom build
script, making installation easier.

Inspired by a similar feature in dyre:
a04be85f60

Fixes: https://github.com/xmonad/xmonad/issues/310
2021-08-17 10:46:07 +01:00
Tomas Janousek
aa35ea1856 Make xmessage handle UTF-8 and export it
This unfortunately breaks xmonad-contrib as several modules define their
own `xmessage` function.

Related: https://github.com/xmonad/xmonad/pull/309
2021-08-17 10:46:07 +01:00
Tomas Janousek
3b6d00ba91 Refactor 'recompile' to be less of a spaghetti-code
This is a preparation for autodetecting stack.yaml and using stack for
recompilation.

Related: https://github.com/xmonad/xmonad/issues/310
2021-08-17 10:46:07 +01:00
Tomas Janousek
befc4bc8d8 github: Drop FUNDING.yml
Replaced with https://github.com/xmonad/.github/blob/main/FUNDING.yml,
which points to xmonad's funding platforms instead of mine.

Related: https://github.com/xmonad/xmonad/pull/295
Related: https://github.com/xmonad/xmonad-contrib/pull/544
2021-08-15 22:27:39 +01:00
Tomas Janousek
6c31aad683 github: Sync ISSUE_TEMPLATE with xmonad-contrib
Related: https://github.com/xmonad/xmonad-contrib/pull/533
2021-08-15 22:25:59 +01:00
Tomas Janousek
3e76270245 ci: Disable optimization in the haskell-ci workflow
Cuts a couple dozen seconds from the build. This was already disabled in
the Stack workflow and we just forgot to put it here as well.

Related: https://github.com/xmonad/xmonad-contrib/pull/580
2021-08-08 11:54:58 +01:00
Tomas Janousek
3a414660fc MAINTAINERS: Link to maintainers' GPG keys
I'm the only one with valid GPG key uploaded to GitHub, it seems. :-/

Fixes: https://github.com/xmonad/xmonad/issues/75
2021-08-08 00:53:36 +01:00
Tomas Janousek
453010bb6d Link to xmonad-docs instead of hackage (fixes some links)
Fixes broken links to X.U.Hacks and X.U.ClickableWorkspaces.
2021-08-07 15:14:12 +01:00