nyyManni / dmenu-wayland

dmenu for wayland-compositors
MIT License
197 stars 22 forks source link

reload prompt while running #12

Closed jyeno closed 4 years ago

jyeno commented 4 years ago

is it possible make dmenu-wl reload the prompt when it receives text? kind of how the command watch works but only updating the prompt

nyyManni commented 4 years ago

Watch works a bit differently as it runs a command periodically and refreshes the contents of the terminal with the output of the command. So how would dmenu "receive" the text for the prompt, as stdin is already reserved for the list of candidates?

What I think you are after is a tail -f type of use case (but just the most recent line visible), where the application would wait for input from stdin and after each newline it would refresh the contents of the bar with the most recent line? That would probably be a completely different application from dmenu, though.

jyeno commented 4 years ago

I thought in this because I wanted to use it in my script(kind of a wrapper of mpv+youtube-dl+playerctl with dmenu-wl to display options and select), and I am searching for a way to update the prompt to actually update "current positon:duration of the audio" without having to call/redraw every time dmenu-wl. Thanks for the attention :)