Commit Graph

3938 Commits

Author SHA1 Message Date
slotThe
61c3aff33c X.A.CycleWorkspaceByScreen: Document
The documentation for this module was lacking, making it significantly
harder to use than the functionality wise very similar
X.A.CycleRecentWS—change that.
2021-11-21 16:42:55 +01:00
slotThe
90a96dee49 X.H.ManageHelpers: Flip logic for (^?), (~?), and ($?)
This changes how the "is*Of" infix operators are hoisted into the
ManageHook context.  Instead of `q ~? x` being a lifted version of
`isPrefixOf q x` we instead let it be a lift of `isPrefixOf x q`.

While this obviously does not matter for symmetric operators like `(==)`
and `(/=)`, for `isInfixOf` it is rather essential.  The reason for that
is that the given `q` on the left side is an atom that can't (shouldn't)
be changed (by the user) and we only have control over the right hand
side.  Otherwise, things like

    title ~? "foo"

would read "only match if `title` is an infix of `foo`" instead of the
much more useful "only match if `foo` is an infix of `title`".

Fixes: 8b6f17ba66
2021-11-17 20:14:26 +01:00
Artem Smaznov
e82a8b8849 X.U.EZConfig: Add modifier keys' KeySyms 2021-11-15 14:16:01 -05:00
brandon s allbery kf8nh
6cb2796fc0 Fix thinko in documentation
This file was obviously copied from `DwmStyle`, and the author missed changing that
out to `simpleDeco` in one place. Just patching in place since it's a one-word change.
2021-11-12 13:47:21 -05:00
slotThe
67a92edd2a Merge pull request #637 from slotThe/modernise-extending
Start modernising X.D.Extending
2021-11-10 11:47:31 +01:00
slotThe
3109e3966c X.D.Extending: Explain how to write additionalKeys
Instead of telling the user how to add custom keybindings to
xmonad—something which is already done in the tutorial—instead explain
instead how one would go about writing a version of
X.U.EZConfig.additionalKeys.  This mostly involves looking at the type
signatures and sticking some standard functions together, so it's quite
a decent way to learn about some of xmonad's internals.
2021-11-09 20:33:32 +01:00
Tomas Janousek
7807eb1be0 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:18:09 +00:00
Tomas Janousek
b40b672288 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:17:36 +00:00
slotThe
99e1b30e86 X.A.Search: Remove num=100 from google search engine
It no longer does what it was intended to do, and in fact, now does the
opposite.

When X.A.Search came to be in ~2007, Google's default of showing 10 or
so search hits was radically inadequate for poweruser needs. The 'num'
argument was used to force display of more hits (i.e., n meant 'display
at least n hits per page').

However, at some point, 'num' was inverted to mean something
catastrophically different: now it apparently means 'display no more
than n hits, total'. If you use that parameter, you will get 1 or 2
pages of hits at most reading 'About 98 results' or 'About 99
results' (no matter how many millions are available), and a blurb at the
bottom of the final page saying 'In order to show you the most relevant
results, we have omitted some entries very similar to the 99 already
displayed.' Removing the 'num' parameter then shows you all the hits
that were suppressed.

This is bad, and should be removed.

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

Co-authored-by: Gwern Branwen <gwern@gwern.net>
2021-11-08 16:46:24 +01:00
slotThe
42dec50c17 Merge pull request #644 from slotThe/window-swallowing-noborder
X.H.WindowSwallowing: Fix single window getting lost
2021-11-08 11:46:05 +01:00
slotThe
5c50387db0 X.H.WindowSwallowing: Fix single window getting lost
ConfigureEvents may occur after a window has been deleted, an UnmapEvent
has already been sent (and thus xmonad already unmanaged the window),
but before a DestroyWindowEvent is caught by the eventHook.  For
example, this is the case when one uses smartBorders with a single
window (such that smartBorders is "active").  The ConfigureEvents
sensibly already have an empty stack (because the UnmapEvent has already
been received), which we then copy to the history.

Whenever a parent window has been found, the sensible thing to do is to
always restore it.  The fact that oldStack is Nothing simply encodes an
empty workspace and is thus something we definitely need to handle as
well.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/638
2021-11-07 16:06:30 +01:00
slotThe
feee11a0ba X.H.DynamicLog: Fix xmobarProp example
In [1] we changed the return type to not be an IO action and hence this
example can't work, even with an otherwise correct configuration.

[1]: 168cb6a6c3 (Removed unnecessary IO)
2021-11-06 11:40:13 +01:00
slotThe
3bc06447d2 X.H.TaffybarPagerHints: Rename defaultConfig to def
The former was removed in [1], so only the latter is valid code right
now.

[1]: 5140f5b5d0
     (Remove things deprecated by Data.Default)
2021-11-06 11:40:13 +01:00
Tomáš Janoušek
52998657ef Merge pull request #639 from liskin/ghc92
Test against GHC 9.2.1; fix new warnings
2021-11-05 10:30:22 +00:00
Tomas Janousek
d67df574cf ci: Run hlint with 9.0.1, not 9.2.1
cabal-3.6.2.0: Could not resolve dependencies:
    [__0] trying: hlint-3.3.4 (user goal)
    [__1] next goal: ghc-lib-parser (dependency of hlint +/-ghc-lib)
    [__1] rejecting: ghc-lib-parser-9.2.1.20211030 (conflict: hlint +/-ghc-lib =>
    ghc-lib-parser>=9.0 && <9.1)
    [__1] trying: ghc-lib-parser-9.0.1.20210324
    [__2] next goal: base (dependency of hlint)
    [__2] rejecting: base-4.16.0.0/installed-4.16.0.0 (conflict: ghc-lib-parser =>
    base>=4.13 && <4.16)
    [__2] skipping: base-4.16.0.0 (has the same characteristics that caused the
    previous version to fail: excluded by constraint '>=4.13 && <4.16' from
    'ghc-lib-parser')
    [__2] rejecting: base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0,
    base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
    base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
    base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
    base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
    base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
    base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
    (constraint from non-upgradeable package requires installed instance)
    [__2] fail (backjumping, conflict set: base, ghc-lib-parser, hlint)
    After searching the rest of the dependency tree exhaustively, these were the
    goals I've had most trouble fulfilling: hlint (536), ghc-lib-parser (335),
    base (219)
2021-11-05 10:14:20 +00:00
Tomas Janousek
4b4f7f2dd6 ci: Test against GHC 9.2 2021-11-05 10:14:20 +00:00
Tomas Janousek
8623c29dd5 ci: Update haskell-ci 2021-11-05 10:14:20 +00:00
Tomas Janousek
5aff766a4c Apply hlint 3.3 hints 2021-11-05 10:14:20 +00:00
Tomas Janousek
e7f102bc9a Revert "Fix -Wdeprecations warnings (time 1.11)"
This doesn't work with the version of time shipped with GHC 8.4 and 8.6.

This reverts commit f2db7bcaa6367bc7db6b49c30e029f10534a99a2.
2021-11-05 10:14:20 +00:00
Tomas Janousek
8197cd9105 Fix -Wincomplete-uni-patterns warnings
I am not proud of this.
2021-11-05 10:14:20 +00:00
Tomas Janousek
5f3a6210a2 Fix -Wincomplete-record-updates warnings
(undefined has `HasCallStack =>` so this will give a useful error
message if anyone ever makes the code fail)
2021-11-05 10:14:20 +00:00
Tomas Janousek
b83f49d90b Fix -Wdeprecations warnings (time 1.11) 2021-11-05 10:14:20 +00:00
Tomas Janousek
850a3c245e Fix -Woperator-whitespace-ext-conflict warnings 2021-11-05 10:14:20 +00:00
Tomas Janousek
e252cc75b1 Fix -Wnoncanonical-monad-instances warnings 2021-11-05 10:14:20 +00:00
Tomas Janousek
d8faed6ad2 Fix -Wnoncanonical-monoid-instances warnings 2021-11-05 10:14:20 +00:00
slotThe
d2f0a0586c Merge pull request #641 from slotThe/prompt-C-t
X.Prompt: Add transposeChars
2021-11-05 08:36:50 +01:00
slotThe
c30e406cfd X.Prompt: Add transposeChars
This is an analogue to Emacs's `transpose-chars` function (expect that
it does not take a universal argument), bound to its default keybinding.
2021-11-03 21:11:05 +01:00
Yecine Megdiche
0973107b29 X.L.CenteredIfSignle: Update CHANGES.md 2021-10-31 10:01:58 +01:00
Yecine Megdiche
f6bcf094e1 Merge pull request #634 from elkowar/centered-if-single
Add XMonad.Layout.CenteredIfSingle
2021-10-30 22:27:09 +02:00
elkowar
eeb36e0d08 Add XMonad.Layout.CenteredIfSingle 2021-10-30 22:11:45 +02:00
slotThe
ab2ba347e5 X.D.Extending: Rephrase introduction, update
Since the tutorial is really the better place to start learning how to
use xmonad, X.D.Extending can be the place for more "advanced" usage
examples.  These would be things like writing small functions to scratch
an itch (rather than entire modules).  Rewrite the introduction
accordingly.

On the way, remove some small inconsistencies/dead links/remarks about
how things are different from version 0.5 onwards—these times are long
gone now.
2021-10-30 14:25:27 +02:00
slotThe
edbff0dca1 X.D.Extending: Link to tutorial instead of the wiki
The configurations on the wiki are quite old and mostly non-functional
at this point.  Instead, we have a shiny new tutorial we can refer to.
It contains links to actual maintainers configurations (complex they may
be, at least they compile).
2021-10-30 14:25:22 +02:00
Tomas Janousek
2b98286ba3 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-contrib-0.17.0/
2021-10-28 17:58:18 +01:00
Tomas Janousek
f5f6ef41cb stack: Bump default resolver to 18.14
No impact on CI, just makes it easier for contributors to use the latest
8.10 GHC.
2021-10-28 17:22:54 +01:00
Tomas Janousek
4a356cfc7c ci: Reenable testing against released X11, xmonad
This was temporarily disabled in 229d52ff07 and 086db3123b because we
couldn't keep xmonad-contrib backwards compatible with xmonad 0.15 any
more, but xmonad 0.17.0 is out now and we can try to stay compatible for
a while.
2021-10-28 17:19:32 +01:00
Tomas Janousek
0fde4c8848 Fix Haskell2010 incompatibilities v0.17.0 2021-10-27 18:06:41 +01:00
Tomas Janousek
991dc6dfac xmonad-contrib.cabal: Specify default-language
Required for cabal-version >= 1.10
2021-10-27 17:57:10 +01:00
Tomas Janousek
805de214d8 Bump cabal-version in xmonad-contrib.cabal
Hackage won't accept the release otherwise.
2021-10-27 17:49:44 +01:00
Tomas Janousek
585558bfb0 Bump version number (0.17.0), update date in changelog 2021-10-27 17:00:33 +01:00
Tomáš Janoušek
a7ccfe61f3 Merge pull request #605 from TheMC47/pp-predicates
`ppPrinters` for custom workspace types, `copiesPP` fix
2021-10-27 10:16:46 +01:00
Yecine Megdiche
16b9f0f96d X.A.CopyWindow: fix copiesPP
Related: https://github.com/xmonad/xmonad-contrib/issues/557

Co-authored-by: Tomáš Janoušek <tomi@nomi.cz>
2021-10-27 10:15:29 +01:00
Yecine Megdiche
2d849cc0b7 X.H.SB.PP: ppPrinters and custom workspace types
Using `ppPrinters` with `WorkspacePredicate` and `WorkspaceFormatter`
allows users to define custom workspace types, beyond the ones
integrated in PP (i.e. urgent, current, visible, visible with no
windows, hidden, and hidden with no windows). `WorkspacePredicate`s are
added for these predicates (`isType`) with unsafe versions that assume
that predicates with a higher precedence already faield `isType'`.
`WorkspacePredicate`s can also be combined and modified with `notWP`,
`andWP`, and `orWP`.

Related: https://github.com/xmonad/xmonad-contrib/issues/557

Co-authored-by: Tomáš Janoušek <tomi@nomi.cz>
2021-10-27 10:15:29 +01:00
Aleksei Pirogov
8b6f17ba66 X.H.ManageHelpers: Add new operators (#633)
Closes: #628
2021-10-26 21:53:52 +02:00
Tomáš Janoušek
e1f4f77346 Merge pull request #632 from Targuinia/patch-1
Minor documentation fixes to `XMonad.Hooks.FadeWindows`
2021-10-26 18:43:34 +01:00
Targuinia
9824b57d12 Corrected a comment in XMonad.Hooks.FadeWindows 2021-10-26 17:03:12 +02:00
Targuinia
a335809767 Fix Haddock comments in XMonad.Hooks.FadeWindows
Some Haddocks comments were for the wrong declaration (-- ^ instead of -- |)
2021-10-26 16:52:29 +02:00
slotThe
719c8ecfe9 X.D.Developing: Refer to cabal instead of runhaskell 2021-10-25 18:40:05 +02:00
slotThe
bc5d4f18e2 X.D.Developing: Refer to CONTRIBUTING for style
The CONTRIBUTING.md file for xmonad now has style guidelines [1].  Since
X.D.Developing does not add anything new here and we direct new
contributors to CONTRIBUTING.md anyways, simply refer to the relevant
section.

[1]: bc8f7ff133
2021-10-25 14:40:26 +02:00
slotThe
5d9a599c9f X.D.Developing: Update Haddock introduction
* The Haddock documentation is a very good resource for the general
  markup syntax.
* Since we are very biased in favour of stack, document how to build
  Haddock docks with it.
2021-10-25 14:40:26 +02:00
Tomas Janousek
7a4dc29418 X.L.Fullscreen: Silence deprecation warning temporarily
Deprecation warnings are now shown to users via xmessage when xmonad
recompiles, and this may include warnings in xmonad(-contrib) itself if
people have a build script that invokes stack/cabal without --silent,
and they then may get confused. The deprecation warning in that case
won't be shown every recompile but only once whenever xmonad(-contrib)
needs to be rebuilt, but it's still annoying.

This silences the warning. We intend to refactor this part of the code
so this is a temporary measure.

Fixes: f666cf4e4e ("X.H.EwmhDesktops: Deprecate standalone hooks")
2021-10-25 10:45:51 +01:00