3

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.

jns-v
  • 73
  • 4
  • Replace `shellPrompt def` with `spawn "/usr/bin/alacritty"` to see if, the issue is the keybinding or `shellPrompt def`. – Chris Stryczynski Nov 25 '20 at 12:59
  • The keybinding works. I did as suggested and alacritty opend just fine. – jns-v Nov 25 '20 at 16:47
  • My guess would be it's showing up - just very small in one of the corners of you screen. Instead of passing `def` you could pass the `dtXPConfig` which is defined in the config you linked (you will also need to copy that definition to your own config). – Chris Stryczynski Nov 25 '20 at 16:57
  • Still no dice. Also the window that has focus remains focused when I hit "M-s"... – jns-v Nov 25 '20 at 17:04

1 Answers1

1

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.

Chris
  • 2,166
  • 1
  • 24
  • 37