Commit Graph

1468 Commits

Author SHA1 Message Date
Tomas Janousek
256eb29ef1 INSTALL: Add section about launching XMonad as default WM 2021-07-25 10:44:41 +01:00
Tomas Janousek
4ba9c8b8c1 INSTALL: Mention dependencies for a couple common distros 2021-07-25 10:44:41 +01:00
Tomas Janousek
98173777fe INSTALL: Drop indent from code blocks
Makes it easier to copy&paste.
2021-07-25 01:17:40 +01:00
Tomáš Janoušek
05aeef0dc2 Merge pull request #308 from liskin/release-infra
Automate and document releasing to Hackage + couple cleanups
2021-07-25 02:17:21 +02:00
Tomas Janousek
85787ce059 Automate and document releasing to Hackage
Pioneered in https://github.com/xmonad/X11, this adds automation for
Hackage releases and updates MAINTAINERS.md with simplified instruction
for the release procedure.

Related: https://github.com/xmonad/xmonad/issues/75
Related: https://github.com/xmonad/xmonad/issues/264
Related: https://github.com/xmonad/xmonad-contrib/issues/393
2021-07-24 18:13:11 +01:00
Tomas Janousek
d64aeba80f Revise extra-source-files in xmonad.cabal
Ship the new docs, drop tests as these get picked up automatically.
2021-07-24 18:13:11 +01:00
Tomas Janousek
72cbe0667d Revise dependencies a bit
utf8-string isn't needed since d9e3ebf531
(late 2014).

Most of the executable xmonad deps are unnecessary since
307b82a53d (early 2015).

Switch from data-default to data-default-class to avoid bringing in deps
and instances we don't need.
2021-07-24 18:13:11 +01:00
slotThe
af354f7528 Merge pull request #312 from mzrinsky/update-cheatsheet
Add help command to help message
2021-07-03 09:10:02 +02: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
42d319545b Merge pull request #309 from MuhammedZakir/xmessage-fix
Use printf instead of echo for xmessage help
2021-06-27 08:27:00 +02:00
MuhammedZakir
2e6eb9068d Use printf instead of echo for xmessage help
In some shells—like bash—the entire help message is shown in a single
line because a newline is printed as a literal "\n" character when using
echo.  Some distributions[1] have /bin/sh linked to bash, and so new
users are likely to run into this at some point.

We could fix this by either removing show and explicitly adding an
escaped quotation symbol before and after the string, or by using printf
instead of echo.  The printf solution seems more portable[2] and so I
propose we go with that one.

[1]: f5b9a25cdd/nixos/modules/config/shells-environment.nix (L129-L143)
[2]: https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo/#65819
2021-06-27 08:09:33 +02:00
slotThe
13849c6230 INSTALL.md: Mention stack upgrade
Users who are installing stack on systems like Debian stable or Ubuntu
may get really old version of stack—much older than we currently
support.  Thankfully, stack can upgrade itself rather easily with one
single command, so mention that.

Fixes: https://github.com/xmonad/xmonad/issues/303
2021-06-15 10:10:17 +02:00
Tomas Janousek
6a7eb85e84 MAINTAINERS.md: Update xmonad core team, add hall of fame
More or less synced with https://xmonad.org/community.html

Fixes: https://github.com/xmonad/xmonad/issues/248
2021-06-07 10:35:48 +01:00
slotThe
2a3c358533 MAINTAINERS.md: Add slotThe
Related:
  - https://github.com/xmonad/xmonad/issues/75
  - https://github.com/xmonad/xmonad/issues/248
2021-06-07 09:44:29 +02:00
slotThe
28637d0db7 Tutorial: Remove ewmhFullscreen for versions < 0.17
Not released as of xmonad-contrib 0.16.

Related: https://github.com/xmonad/xmonad/issues/307
2021-06-07 08:44:50 +02:00
Tomas Janousek
b14b3ffcec Bump version number (pre-release 0.16.9999)
Merging NewSelect into Choose is a breaking change, bump the version to
let xmonad-contrib depend on it.
2021-06-04 19:03:11 +01:00
Tomáš Janoušek
bbb4a0ef25 Merge pull request #281 from slotThe/NewSelect
Merge X.L.LayoutCombinators.(|||) into X.L.(|||)
2021-06-04 18:22:40 +01:00
slotThe
9db74715f2 X.Layout: Simplify JumpToLayout implementation
The `choose` combinator is very general; much more so than the
combination of `switch`, `swap`, and `passOnM`.

We can thus replace most of the implementation with calls to `choose`
and properly put everything related to `JumpToLayout` under one guard.
Plus, we don't need to define any extra functions that would have to be
tested in some way.

Co-authored-by: Tomas Janousek <tomi@nomi.cz>
2021-06-04 18:17:13 +01:00
slotThe
5b064f474d Update CHANGES.md 2021-06-04 18:17:11 +01:00
slotThe
bffa6dc2ce Merge X.L.LayoutCombinators.(|||) into X.L.(|||)
The functionality of the former are quite handy to have in core and we
can do so with minimal code changes.

The drawbacks of this approach are

  1. We can't merge JumpToLayout into ChangeLayout because people may
     have imported JumpToLayout(..), which we can't simulate with type
     aliases, patterns, and the like.

  2. Because the internal structure of X.L.LayoutCombintors.(|||) is a
     bit different, this creates a regression for people who used
     NextLayoutNoWrap or Wrap in their configs.  We could work around
     this by creating fake instances of these fields in the new
     JumpToLayout constructor and simply not doing anything with them,
     but since this seems like quite an advanced and specific use-case,
     failing fast and hard (as opposed to adding deprecation messages
     and then "silently" not handling these messages) seems preferrable
     here.

Related: https://github.com/xmonad/xmonad-contrib/pull/493
Related: https://github.com/xmonad/xmonad-contrib/issues/116
2021-06-04 18:17:04 +01:00
Tomas Janousek
341dea5907 Call xrrUpdateConfiguration to sync Xlib's view of screen config
Xrandrint.h says:

    /*
     * if a configure notify on the root is recieved, or
     * an XRRScreenChangeNotify is recieved,
     * XRRUpdateConfiguration should be called to update the X library's
     * view of the screen configuration; it will also invalidate the cache
     * provided by XRRScreenConfig and XRRConfig, and force a round trip
     * when next used.  Returns invalid status if not an event type
     * the library routine understand.
     */

If any user code needs that info/cache to be correct, we need to call
this.
2021-06-01 18:45:36 +01:00
Tomas Janousek
676530307b Clean up uses of setClientMessageEvent
In sendRestart, switch to the new setClientMessageEvent' and pass no
data, as no data are expected. Passing currentTime was confusing, as
it's only interpreted as time in some ClientMessage types.

In killWindow, it's the other way around.
2021-06-01 18:41:21 +01:00
Tomas Janousek
09425bbe43 Bump version number (pre-release 0.16.999) 2021-06-01 18:37:19 +01:00
Tomas Janousek
1805666e9d Bump X11 dependency
We have a bunch of open PRs that need features added in X11-1.10.

Related: https://github.com/xmonad/xmonad/pull/274
Related: https://github.com/xmonad/xmonad/pull/273
Related: https://github.com/xmonad/xmonad-contrib/pull/545
Related: https://github.com/xmonad/xmonad-contrib/pull/546
Related: https://github.com/xmonad/xmonad-contrib/pull/399
2021-06-01 18:37:19 +01:00
slotThe
40cd2081da Upcase tutorial file, mention it in README
Related: https://github.com/xmonad/xmonad/pull/278#issuecomment-850717606
2021-05-29 07:41:18 +02:00
slotThe
66514127f3 Merge pull request #278 from slotThe/new-tutorial
Add New Tutorial
2021-05-28 17:43:03 +02:00
slotThe
fdc3bf0484 tutorial.md: Point IRC channel to libera.chat
The reference to the freenode matrix channel is deleted for now; though
it may be added back in later-on, as the matrix team is working towards
bridging Libera.  We may also link the other matrix channel at some
point.

Related: https://github.com/xmonad/xmonad-web/pull/21
2021-05-28 16:52:09 +02:00
slotThe
f97d2527ff tutorial.md: Use logTitles
Ever since 322e06eed9c4b23a465d2857df462b8a2d716246 `ppTitleUnfocused`
does not exist anymore, as it was moved to `X.U.Loggers.logTitles`.
This makes the tutorial aware of that.
2021-05-28 16:52:09 +02:00
slotThe
7199d953a7 Add tutorial.md 2021-05-28 16:52:09 +02:00
slotThe
15653d4669 Add INSTALL.md 2021-05-28 16:50:06 +02:00
Tomas Janousek
d64a22d8db Switch IRC channel to irc.libera.chat
Since freenode has decided to kick us off because we said that we're
moving to Libera:

    Topic for #xmonad is "This channel has moved to ##xmonad. The topic is in violation of freenode policy: https://freenode.net/policies"
    Topic set by freenodecom (~com@freenode/staff) on Wed, 26 May 2021 04:59:51

it is high time we change the official channel on the website—even
though we don't even have OP on Libera yet.

Related: https://github.com/xmonad/xmonad-web/pull/26/
Co-authored-by: slotThe <soliditsallgood@mailbox.org>
2021-05-26 10:55:52 +01:00
Tomas Janousek
2e9f8dc831 ci: Refresh caches once a month
GitHub Actions writes caches on the first miss and then never updates
them again. If the CI is used frequently, the caches never expire and
as they get old, become less useful.

To avoid this, force refreshing the caches once a month.

Related: 52751f47d0
2021-05-24 23:19:30 +01:00
Tomas Janousek
e8bfc5bb69 ci: Prevent ~/.stack/pantry cache from being empty
When building with an LTS version that has exactly the dependencies we
need (X11-1.9.2), stack doesn't need to download the Hackage index. If
GitHub Actions cache locking chooses this job as the one that writes the
cache, then the "stack-pantry-Linux" cache entry stays empty, possibly
forever.

Force Hackage index update to prevent this from happening.

Related: d1a4820b55
2021-05-24 23:13:45 +01:00
Joan Milev
9e5b16ed8a Remove all instances of deriving Typeable
The derivation of Typeable has been automatic for quite a while now.

Related: https://github.com/xmonad/xmonad-contrib/issues/548
2021-05-24 22:56:36 +01:00
Tomas Janousek
d72da951c9 Use -Wno-* instead of the obsolete -fno-warn-* 2021-05-24 11:19:53 +01:00
Tomas Janousek
90101613e7 Unclobber dirs/Dirs in import XMonad
"dirs" is used several times in xmonad-contrib as a short for
"directions" and when I tried renaming those uses, I had a really hard
time coming up with something nice/meaningful. Therefore I think it's
best if we rename this instead, "dirs" is a valuable part of the
namespace. :-)

Fixes: 735fb58f6c ("Revise XDG handling")
2021-05-24 11:15:00 +01:00
Tomas Janousek
6caac22df1 ci: git-friendly apt deps in cabal.haskell-ci 2021-05-23 18:33:00 +01:00
Tomas Janousek
e9987b1adf Merge branches 'pr/grabkeys-nosymbol', 'pr/extensible-config' and 'pr/funding' 2021-05-21 11:49:52 +01:00
Tomas Janousek
383ffb772e Prevent grabKey from accidentally grabbing all unbound keys
grabKeys doesn't check that a KeySym is valid before looking up the
KeyCode(s) it's bound to. In particular, KeySym 0 (NoSymbol) gets mapped to every
unbound KeyCode, since that's what XKeycodeToKeysym returns for those.

This can most easily be reproduced using `statusBar` in xmonad-contrib,
with def as the key-mapping function; this unexpectedly invokes the
following instances:

    instance Default b => a -> b where def = const def
    instance (Default a, Default b) => (a, b) where def = (def, def)
    instance Default CInt where def = 0

thus producing a function which binds `toggleStruts` to the (KeyMask,
KeySym) pair (0, 0) (and demonstrating why Default is a dangerous
abstraction). The person who reported this used xmodmap to clear KeySyms
from their numpad keys, and then xmonad would bind strut toggling to the
entire numpad.

Note that it is not reliably possible to override `def` in this
situation (without introducing a new type); the only thing we can do is
try to avoid the aftermath, and I would expect that an inadvertent 0
KeySym is the most common error here anyway.

Fixes: https://github.com/xmonad/xmonad/issues/293
Fixes: 40cb12ce17 ("Grab all keycodes linked to each keysym, not just one")
Co-authored-by: Brandon S Allbery KF8NH <allbery.b@gmail.com>
2021-05-21 11:41:52 +01:00
Tomas Janousek
6379307baa Add Sponsor button to GitHub
These past months I've spent a lot of time working on xmonad¹ and I feel
like I've done a lot. This is, however, not sustainable long term. :-(

¹) primarily xmonad-contrib and the community in general

I'd like to try making my GitHub Sponsors profile a bit more visible,
hoping that would allow me to continue dedicating time to xmonad.

I know that the correct approach probably is for the xmonad project to
find a fiscal sponsor like the Software Freedom Conservancy or Open
Collective or something and accept donations as a project, and then
redistribute that to people, but I don't think the project has enough
momentum to do something as complicated as that. :-/

Related: https://github.com/xmonad/xmonad-contrib/pull/544
2021-05-18 16:53:07 +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
a5cee9bac2 ci: Fix failing installation of GHC
Since actions/virtual-environments#3268, the GHC PPA is no longer
enabled by default. :-(

(It would be better to use the haskell/actions/setup action, but it
insists on doing `cabal update` even if all we need is to install GHC
and Stack, which adds noticeable delay:
https://github.com/haskell/actions/issues/29)
2021-05-14 19:20:16 +01:00
github-actions
131fd3669f man: Update 2021-04-27 11:05:32 +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
Tomáš Janoušek
46f637e0be Merge pull request #289 from slotThe/maintainers
Update MAINTAINERS.md: add twitter, website references
2021-04-08 21:14:57 +01:00
slotThe
095d0e37d6 Update MAINTAINERS.md: add twitter, website references
Relevant mailing list discussion for the website part is available at
[1].

[1]: https://mail.haskell.org/pipermail/xmonad/2020-February/015358.html
2021-04-08 19:29:38 +02:00
Tomáš Janoušek
7e798afd11 Merge pull request #288 from slotThe/minimal-pragma
Add `MINIMAL` for `ExtensionClass` and `LayoutClass`
2021-04-07 18:33:07 +01:00
slotThe
669a9aed9e LayoutClass: update documentation
Make it clearer that we in fact do not require implementations for a
minimal complete definition, but that the default implementations have a
certain kind of dependency structure.
2021-04-07 10:12:15 +02:00
slotThe
c869129c71 ExtensionClass: Use MINIMAL pragma 2021-04-07 10:12:14 +02:00
Tomáš Janoušek
b8523a3c9b Merge pull request #202 from wygulmage/stack_instances
Add Functor, Foldable, and Traversable instances for StackSet.Stack
2021-04-04 09:56:45 +01:00