-
Notifications
You must be signed in to change notification settings - Fork 26
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
Multiple exec commands #92
Comments
Yes, I am sure this feature would be useful.
I need to refactor the config handler code to support this feature. |
I guess it depends whether you prefer to have a prefix key, but wouldn't nsxiv-like approach be better? Basically, one exec, that also passes the next pressed key after it's been triggered and the current file to a given shell script. So instead of a bunch of single key bindings you have a sort-of mode (like in vim), allowing you to potentially bind already used keys. |
To be honest, I don't like this way. The key is passed in arguments, but the path is on stdin stream. Maybe I'm missing something, but it looks strange =)
So, we will have one script for all operations and this script will be very swayimg-specific. It's not just a call to
You can already rebind any existing key. |
Fair enough. It's designed like this because in nsxiv you can mark multiple files and then run this script on all the selected files. (e.g. useful for rotating multiple photos)
Well, yeah.
Yes, but the point is with a script like that you can have
|
Oh, I get it. It's similar to |
One feature that would be quite useful would be allowing for multiple exec commands. I've repeatedly found myself in a pattern where I run swayimg twice on the same set of images to take advantage of different exec commands on each pass through. It would be very convent if I could bind a second (or more) command to a different key and make only a single pass, performing the correct action on each image.
I'm not opposed to putting together a PR that adds the functionality, but I didn't know
exec2
. but I'm bad at naming things.exec2
throughexec9
. Indeed, allowing an arbitrary/unbounded number of commands feels rewarding, but also likely requires greater changes to the code.The text was updated successfully, but these errors were encountered: