You are not logged in.

#1 2021-09-05 15:27:26

Vincintosh
Member
Registered: 2017-10-13
Posts: 18

[SOLVED] Dmenu disappears when second instance is launched

Hello everyone, I'm a heavy dmenu user and use it in many scripts... recently it started to behave abnormal. Usually when running scripts, you need multiple instances of dmenu: you select something in the first one and then a second dmenu pops up asking for other options and so on.
Well, when I run dmenu, the first instance usually shows as normal, but then when a second istance needs to be run, it appears for a brief moment and then disappears, while still accepting keyboard input (other windows don't respond to keyboard input, but if I blindly type stuff, it works as if dmenu is still receiving keyboard input). I tried to run it from the terminal too but I get no error whatsoever to stdout and I have no idea what is going on and why. It behaves this way both on external and internal laptop displays. I am running DWM with dwmblocks, and if I hide the statusbar nothing changes (at first I thought that it was going to be shown under the statusbar for some reason). The problems presents itself both with a custom patched version and with the stock version from the suckless website. I wouldn't want to switch to rofi because it means configuring it from scratch and changing all scripts since many of them use dmenu options and a simple alias wouldn't be sufficient. I hope someone could help diagnosing this problem.

Last edited by Vincintosh (2021-09-07 12:40:34)

Offline

#2 2021-09-05 19:29:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,457

Re: [SOLVED] Dmenu disappears when second instance is launched

Well, not usually, but if you link dmenu instances, try to insert a little gap (sleep 0.2)
dmenu will try to grab the input (or server) and quit if that fails unless you've some patches vesion and use --normal-window or so.
Especially if you're piping dmenu's into each other and/or use -f.

Ideally post a demo script to trigger this.

Offline

#3 2021-09-06 06:07:27

Vincintosh
Member
Registered: 2017-10-13
Posts: 18

Re: [SOLVED] Dmenu disappears when second instance is launched

Thank you very much for your help!
I found the culprit by luck. I was actually testing xcompmgr options and had a terminal window with it running inside and closed it by mistake and dmenu started to behave normally without the compositor being active... I switched to picom and it worked without any problems!
Anyway I'll try your trick because it is useful to know if it works!!

Offline

Board footer

Powered by FluxBB