Cloudef / bemenu

Dynamic menu library and client program inspired by dmenu
GNU General Public License v3.0
1.16k stars 90 forks source link

[wayland] bemenu -f stuck at Loading... #352

Open dkwo opened 11 months ago

dkwo commented 11 months ago

On Wayland (compositor is river, OS Void Linux, bemenu v0.6.15), the command bemenu -f is stuck at Loading.... I'm trying to translate the command dmenu -f -fn "$BIB_GENERIC_FONT" -i -sb "$2" -p "$1" <&- from dmenu as bemenu -f --fn "$BIB_GENERIC_FONT" -i --sb "$2" -p "$1" <&- and I was hitting this.

Cloudef commented 11 months ago

You are closing stdin? Do you want menu without items?

dkwo commented 11 months ago

Ultimately, I want to use bemenu -f --fn "Terminus 24" -i --sb "#005577" -p "Some message here" <&- but even bemenu -f in terminal (foot) is stuck at Loading...

dkwo commented 11 months ago

So, yes, it wants no items, just capture text, to be used in input="$(xprompt "Type text to search: " "$BIB_GENERIC_COLOR")" where

xprompt () { # Usage xprompt [MSG] [BG_COLOR]
    dmenu -f -fn "$BIB_GENERIC_FONT" -i -sb "$2" -p "$1" <&-
}
dkwo commented 11 months ago

see https://github.com/huijunchen9260/dmenubib

Cloudef commented 11 months ago

currently bemenu does not seem to detect closed stdin (it should, and needs to be fixed), but you can achieve similar by forwarding in /dev/null, bemenu -f --fn "Terminus 24" -i --sb "#005577" -p "Some message here" </dev/null

dkwo commented 11 months ago

Thanks, that also works for me.

dkwo commented 11 months ago

Feel free to keep this issue open, or close it as you prefer.