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

Bidirectional userscripts / output from commands #902

Open
The-Compiler opened this issue Aug 28, 2015 · 3 comments
Open

Bidirectional userscripts / output from commands #902

The-Compiler opened this issue Aug 28, 2015 · 3 comments
Labels
priority: 3 - wishlist Issues which are not important and/or where it's unclear whether they're feasible.

Comments

@The-Compiler
Copy link
Member

In several situations (mainly userscripts and in the future plugins), it would be nice if qutebrowser commands could have a return value, which then gets communicated back to the caller in some way.

@The-Compiler The-Compiler added the priority: 3 - wishlist Issues which are not important and/or where it's unclear whether they're feasible. label Oct 1, 2015
@keegancsmith
Copy link

Here is a "simpler" solution which I hope fulfills a large number of use cases. I understand though it is probably better to do a proper solution which is what this issue is about. Idea: re-execute the userscript with the output as a last argument. This would make it easy for existing bash scripts to use this functionality. Would work on windows. Probably need a way to specify arguments to the script (so it knows its getting output).

For example I really want to have password_fill interact with qutebrowser to give a list of passwords to fill. Right now it has support for dmenu which isn't on mac. It would be cool if it could get qutebrowser to do what dmenu does.

@Dakedres
Copy link

Dakedres commented Apr 16, 2024

We could serialize the return values from jseval as JSON and just have a QUTE_FIFO_OUT or QUTE_EVALUATED file to wait for newlines from. It doesn't have to be complicated.

@The-Compiler
Copy link
Member Author

Things are always simple if you're not actually implementing and maintaining them 😉 A solution for this will at least need to be designed to work with more commands than only jseval, even if initially only a subset could be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: 3 - wishlist Issues which are not important and/or where it's unclear whether they're feasible.
Projects
None yet
Development

No branches or pull requests

3 participants