Early Exit only on enter action
I have two workflows when it comes to taking screenshots. I want to:
- Hit enter and close
sattyand save the file to~/Pictures/Screenshots/$timestamp.png(which is done) - Click on Copy and manually close it if needed.
The --early-exit flag exits on both copy and save. I wish this could be configured.
Can you check if #174 solves your use case, please? You could use action-on-enter="save-to-file-and-exit" once it is merged.
@RobertMueller2 Do you think we should remove --early-exit at one point? I am wondering if we can factorize a bit
I thought about this too because there's clearly an overlap, for now I'd probably keep it because it still has a use combined with the right-click-copy option. If that was an action, I think we wouldn't need it any longer. But of course it would break existing scripts. So maybe put a pin in it for now?
My 2 cents:
-
early-exithas been taken from Swappy. I never liked the name but functionality seemed useful - we should make sure that whatever we introduce is a "sane and solid" concept.
- if we would introduce something new, then we should keep --early-exit and map its current behaviour to whatever replaces it internally. And yes, that means we will probably never remove it. We can declare it deprecated but removal will most likely never happen - and thats okay
Makes sense.
I was thinking of renaming/remaping all known CLI args shortcuts (like --right-click-copy) to action-on-{key} to be consistent and to leverage the actions system.
We then would have:
--action-on-enter
--action-on-escape
--action-on-right-click
[..more later but we can now be consistent..]
And maybe remove the --right-click-copy
WDYT?
great idea.. so we have
triggers
--action-on-enter
--action-on-escape
--action-on-right-click
actions
which ones?
... what do we do with multiple/compound actions?
For now we have these:
SaveToClipboard,
SaveToFile,
SaveToClipboardAndExit,
SaveToFileAndExit,
Exit,
With *AndExit being created for the --action-on-escape.
But long term I was thinking of allowing lists in --action-on-*, like such:
satty -f - --action-on-escape=save-to-clipboard,exit