So my MWE xmonad.hs is as follows:
import XMonad
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
myKeys =
[ ("M-s", shellPrompt def)
, ("M-<Return>", spawn "/usr/bin/alacritty")
, ("M-q", kill)
, ("M1-r", spawn "xmonad --recompile && xmonad --restart")
]
main = do
xmonad $ def
{ modMask = mod4Mask
} `additionalKeysP` myKeys
The key bindings work except for
("M-s", shellPrompt def)
With another config i tried it works as expected but I can not figure out, what's wrong with my MWE above (obviously it compiles just fine). Also I already have a config I am rather content with so I would prefer implementing prompts in my own config instead of trimming down the linked one.
System: Arch Linux
~ $ pacman -Qi xmonad | grep Version
Version : 0.15-72
Any suggestions are much appreciated. Please let me know if you require additional info. Thank you!
EDIT 1: I added two more key bindings to the mwe:
, ("M-S-e" , spawn $ "xdotool text 'test'")
, ("M-S-w" , spawn $ "xdotool key Cotrol_L+F4")
neither of them works, just like the prompt (xdotool
is installed). So there might be a connection?
I have also tried to use the standard syntax for key bindings without using XMonad.Util.EZConfig
to no avail.
I had the same issue and this ArchWiki link sent me on the right path solve my problem.
The problem seems to be caused by missing fonts on the system that the xmonad prompt expects.
Excerpt:
Broken/missing XMonad.Prompt and window decorations
XMonad by default uses the font -misc-fixed-----10-------* [5]. If this font is missing those windows simply fail to render at all. Easiest fix is to install xorg-fonts-misc.
I am actually running Gentoo 5.4.80 and my solution was to install the x11-base/xorg-x11
package.