4

When I make changes to xmonad.hs, I almost always make syntax errors at first try (I guess haskell syntax is too cryptic for me, but Xmonad is too good a tool to give up). When I xmonad --recompile in a terminal, these errors are listed in my terminal, which is useful. But they also are listed in a crappy, annoying xmessage window which pops up, how can I avoid this?


Edit: I haven't seen the problem for some time now on my distribution, I guess developers caught the redundancy.

Hugo Raguet
  • 418
  • 3
  • 11

2 Answers2

1

Sadly this is hardcoded into the XMonad recompile function at this time.

David Holm
  • 17,522
  • 8
  • 47
  • 47
  • Thanks. Any chance this will get removed in a future release, or is it useful for too many people? Is it worth asking developers? – Hugo Raguet Feb 16 '16 at 12:09
0

This should be able to be worked around by appending a noop implementation of xmessage to your PATH when you run xmonad! In most cases something like the following should work:

tmp=$(mktemp -d)
touch $tmp/xmessage
chmod +x $tmp/xmessage

Now run

PATH="$PATH:$tmp" xmonad --recompile

To recompile with no xmessage dialogue!

For Nix users like me, the steps might be different. In my case the file $(which xmonad) explicitly defines a XMONAD_MESSAGE env var pointing to the xmessage build in the Nix store, and so my fix looked something like this:

tmp=$(mktemp -d)
touch $tmp/xmessage
chmod +x $tmp/xmessage
cp $(which xmonad) > ./xmonad
# edit ./xmonad to change XMONAD_MESSAGE to set it to $tmp/xmonad
chmod +x ./xmonad
# now we can run:
./xmonad --recompile
Quelklef
  • 1,999
  • 2
  • 22
  • 37
  • 1
    Thanks for the suggestion. Actually I haven't seen the problem for some time now on my distribution, I guess developers caught the redundancy. – Hugo Raguet Aug 12 '22 at 09:48