wldash icon indicating copy to clipboard operation
wldash copied to clipboard

If stdin is connected to pipe, read the filenames from there instead.

Open Siborgium opened this issue 4 years ago • 2 comments

It is sometimes desirable to provide only specific *.desktop files to wldash, for it could be used to create custom menus and scripts. This draft attempts to solve this problem. It, however, needs further consideration and proper discussion -- while the draft is simple (and optional), it is straightforward and (maybe) too simple.

Siborgium avatar Jul 23 '20 02:07 Siborgium

Another option I've came up with is to pass filenames through command-line arguments, though I'm afraid it would complicate parsing by a large degree.

Siborgium avatar Jul 23 '20 07:07 Siborgium

Use of the launcher for custom use-cases (effectively simulating dmenu) makes sense to some degree, but it seems odd to use .desktop files to generate arbitrary menus.

One option here would be to create a separate widget that works like the launcher but behaves more like dmenu. Then you'd be able to configure the use of that widget instead of the launcher whenever you want wldash to be in "prompt" mode.

If implemented in stdin/stdout fashion, one would do:

selection=$(cat options | wldash --config my_prompt_config)

One could also do something like:

WLDASH_DMENU_OPTIONS=options.txt WLDASH_DMENU_RESULT=selection.txt wldash --config my_prompt_config

I haven't thought deeper about it, but having something dedicated might work better than trying to repurpose the current launcher.

kennylevinsen avatar Jul 23 '20 17:07 kennylevinsen