`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")
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.
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
Some layout and layout modifiers that keep track of some window
properties don't do garbage collection and update their state when
windows are destroyed. By broadcasting this event, it should be easier
for layouts to clean up
Related: https://github.com/xmonad/xmonad-contrib/pull/474
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.
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
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
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>