Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Siborgium
Copy link
Contributor

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
Copy link
Contributor Author

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.

@kennylevinsen
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants