3903 Commits

Author SHA1 Message Date
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: f666cf4e4e0e ("X.H.EwmhDesktops: Deprecate standalone hooks")
2021-10-25 10:45:51 +01:00
Tomas Janousek
c51353c6c6 Merge branch 'packdeps' 2021-10-24 13:56:53 +01:00
Tomas Janousek
046f3c3871 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 13:55:19 +01:00
Tomas Janousek
8edc8ab789 Bump upper bounds for bytestring, time
I've tested these manually by adding them to extra-deps. Hopefully
they'll soon be available in a release of GHC or Stackage, so I'm not
adding an extra stack.yaml to test this.
2021-10-24 13:55:19 +01:00
Tomas Janousek
5cc26aaa21 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-contrib/issues/393
2021-10-24 13:55:02 +01:00
Tomas Janousek
d6b4f174d6 ci: Add Stackage LTS 18 to Stack test matrix 2021-10-24 11:17:41 +01:00
Tomas Janousek
0be6780559 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 11:11:48 +01:00
slotThe
f39218ddb5 X.D.Developing: Drop confusing "or freer" part
Currently, all contrib modules are licensed under a 3-clause BSD license
anyways.  The term "freer" is quite confusing and may even refer to
several (non-BSD) licenses, depending on the authors sensibilities.
2021-10-24 08:04:38 +02:00
slotThe
9b840a1189
Merge pull request #631 from liskin/readme
README: Improve badges, Installation/Contributing sections; CHANGES prep
2021-10-23 09:38:39 +02:00
Tomas Janousek
c71756095e CHANGES: Almost final prep 2021-10-23 00:41:27 +01:00
Tomas Janousek
32028915a3 README: Improve Installation/Contributing sections further
(Copy&paste from https://github.com/xmonad/xmonad/pull/340 mostly.)
2021-10-23 00:34:39 +01:00
Tomas Janousek
4560abd1e6 README: Tweak badges a bit 2021-10-22 23:24:15 +01:00
Tomáš Janoušek
2c01279d1c
Merge pull request #630 from liskin/readme
README: Long overdue update
2021-10-22 22:12:20 +01:00
Tomas Janousek
33ccf910a6 Add CONTRIBUTING.md
This makes GitHub show a link to it when opening issues/PRs.
2021-10-22 22:11:56 +01:00
Tomas Janousek
268fc70d0e README: Long overdue update
* "community-maintained" is more accurate and sounds better than "third-party"
* refresh description
* add logo and badges to make it prettier
* update doc links
2021-10-22 22:11:56 +01:00
Tomas Janousek
c0cea57604 LICENSE: Fix wording to make it detectable by GitHub 2021-10-22 22:11:56 +01:00
Tomáš Janoušek
0f6403c2e9
Merge pull request #629 from liskin/managedocks-hooks-deprecation
X.H.ManageDocks: Deprecate individual hooks
2021-10-22 20:48:16 +01:00
Tomas Janousek
c2e36da92c X.H.ManageDocks: Deprecate individual hooks
This will make it easier to transition to an implementation of EWMH that
doesn't expose the individual hooks: X.H.ManageDocks would become a
deprecated compatibility reexport of X.H.EWMH.Struts for a release or
two, but the individual hooks need to be removed before that.

Note that individual hooks in X.H.EwmhDesktops were deprecated earlier
and individual hooks in XMonad.Hooks.UrgencyHook aren't exported any
more (or perhaps never been), so this only leaves X.H.SetWMName, which
unfortunately does not have a combinator interface at this point.

Related: https://github.com/xmonad/xmonad-contrib/pull/625
2021-10-22 16:07:31 +01:00
slotThe
0aeaf93a6e
Merge pull request #438 from elkowar/cleanup-independent-screens
X.L.IndependentScreens: Add utility functions, refactor
2021-10-22 08:30:21 +02:00
elkowar
b552b453d5 X.L.IndependentScreens: Add utility functions, refactor
* Add a few utility functions which make working with IndependentScreens
  more ergonomic; namely workspaceOnScreen, focusWindow', focusScreen,
  nthWorkspace, and withWspOnScreen.
* Clean up whenCurrentOn and make it more readable.
* Fix the type-signature of onCurrentScreen.
2021-10-22 08:21:24 +02:00
Tomas Janousek
956d51c225 Update .mailmap
Drop lines that aren't needed.
Add lines to deduplicate people.
Add lines to add/fix some names.
2021-10-21 16:22:07 +01:00
slotThe
08b8b285a8
Merge pull request #620 from TheMC47/extending-module-list
`X.D.Extending`: Remove module list
2021-10-21 14:49:37 +02:00
Yecine Megdiche
b2d4aa7dad Pull Request Template: Drop X.D.Extending 2021-10-21 08:28:35 +02:00
Yecine Megdiche
839302533b X.D.Extending: Remove module list
As of 38c11c1e3cfa1b91d9af796872e3d011895b4d50, all modules now include
a `Description` string that can be rendered using Haddock. This makes
the list in `XMonad.Doc.Extending` redundant.

Related: https://github.com/xmonad/xmonad-contrib/issues/619
2021-10-21 08:28:35 +02:00
Tomáš Janoušek
e5b5ce74b2
Merge pull request #626 from liskin/ewmh-refactor-quick
EWMH: Improve interface for custom sorting, filtering, renaming and window activation
2021-10-20 16:58:40 +02:00
Tomas Janousek
6ab136eb56 scripts/xmonadctl: Fix build
Fixes: bd5b969d9ba2 ("Apply hlint hints")
2021-10-20 15:24:55 +01:00
Tomas Janousek
f666cf4e4e X.H.EwmhDesktops: Deprecate standalone hooks
We should get rid of this error-prone interface ASAP, so mark it as
deprecated to give people some time to adapt their configs.
2021-10-20 14:51:39 +01:00
Tomas Janousek
860f80a6d3 X.H.Focus: Adapt docs to the new activation interface
Fixes: https://github.com/xmonad/xmonad-contrib/issues/396
Related: https://github.com/xmonad/xmonad-contrib/pull/192
Related: https://github.com/xmonad/xmonad-contrib/pull/128
2021-10-20 14:51:23 +01:00
Tomas Janousek
79b130b9d6 Add some docs references for workspace filtering 2021-10-20 14:51:23 +01:00
Tomas Janousek
08ec79eec1 X.H.EwmhDesktops: Improve interface for hooking window activation
https://github.com/xmonad/xmonad-contrib/pull/192 introduced a breaking change:

  * `XMonad.Hooks.EwmhDesktops`

    `ewmh` function will use `logHook` for handling activated window. And now
    by default window activation will do nothing.

This breaking change can be avoided if we designed that a bit
differently. #192 changed `ewmhDesktopsEventHook` to invoke `logHook`
instead of focusing the window that requested activation and now
`logHook` is supposed to invoke a `ManageHook` through `activateLogHook`
which consults a global `NetActivated` extensible state to tell if it's
being invoked from `ewmhDesktopsEventHook`. This seems convoluted to me.

A better design, in my opinion, is to invoke the `ManageHook` directly
from `ewmhDesktopsEventHook`, and we just need a way to configure the
hook. Luckily, we now have `X.U.ExtensibleConf` which makes this
straightforward. So we now have a `setEwmhActivateHook`, and the
activation hook defaults to focusing the window, undoing the breaking
change.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/396
Related: https://github.com/xmonad/xmonad-contrib/pull/110
Related: https://github.com/xmonad/xmonad-contrib/pull/192
Related: https://github.com/xmonad/xmonad-contrib/pull/128
2021-10-20 14:51:23 +01:00
Tomas Janousek
3175f276be X.A.WorkspaceNames: Adapt EwmhDesktops integration to the new interface
Related: https://github.com/xmonad/xmonad-contrib/pull/105
Related: https://github.com/xmonad/xmonad-contrib/pull/122
Related: f271d59c345e ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
2021-10-20 14:50:17 +01:00
Tomas Janousek
fe933c3707 X.H.EwmhDesktops: Improve interface for custom workspace sorting, filtering and renaming
Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use
the `ewmh` combinator and still customize workspace ordering, filter out
scratchpads and expose altered workspace names.

To make this all work nicely, we introduce not one, but two
configuration options: a sort/filter function and a rename function.
This is because renaming and sorting in one go makes it hard (perhaps
even impossible) to decide which workspace to switch to upon receipt of
a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only
reason this wasn't a problem before is because one could pass the
renaming function to `ewmhDesktopsLogHookCustom` only, not
`ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen
in the related closed pull requests.)

Related: https://github.com/xmonad/xmonad-contrib/pull/238
Related: https://github.com/xmonad/xmonad-contrib/pull/105
Related: https://github.com/xmonad/xmonad-contrib/pull/122
2021-10-20 14:50:17 +01:00
Tomas Janousek
6b9520b03b X.H.EwmhDesktops: Mostly cosmetic, mostly docs cleanups 2021-10-20 14:48:41 +01:00
Tomas Janousek
6358683058 X.H.UrgencyHook: Add askUrgent and doAskUrgent
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

Related: https://github.com/xmonad/xmonad-contrib/pull/110
Related: https://github.com/xmonad/xmonad-contrib/pull/128
Related: https://github.com/xmonad/xmonad-contrib/pull/192
2021-10-20 14:46:52 +01:00
Tomas Janousek
3a72dd5355 X.U.ExtensibleConf: Add high-level idioms for non-Semigroup, but Default types
For configuration values that don't compose well using a Semigroup
instance, provide a high-level API allowing arbitrary modification of
the value, taking its Default if absent. This API is only usable for
separate configuration data and cannot be used to guard addition of hook
using `once`.
2021-10-20 14:46:52 +01:00
Tomas Janousek
3dbdc51158 X.U.ExtensibleConf: Perform 'add' before modifying in once(M)
This better matches the documentation.

It is still, however, considered bad practice to rely on the order of
these operations. `f` isn't meant to touch any extensible configuration.
If it happens to do so anyway, it no longer loops. :-)
2021-10-19 22:57:50 +01:00