-
Notifications
You must be signed in to change notification settings - Fork 43
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
[Feature request] Run command on image copy #176
Comments
Ability to have some kind of feedback on image copy/save would be a positive improvement to UX. |
I was looking for something like this too. This is the solution I came up with: my swappy script. Edit- I just realized you were looking for a copy-to-clipboard notification. This script notifies of file saves and overwrites the filename with a timestamp. I'm sure a clipboard notification could be included. I'll do some research on that and see what I can come up with. |
@jerbaroo It's already possible to chain another action using Unix pipes, as Swappy can already send the image to STDOUT when "save" is used. The receiving app or script needs to be able to listen for input on STDIN and wait for it to arrive.
|
@markstos can that approach distinguish between the user actions of saving to file vs copying to clipboard? |
@jerbaroo You can pipes to both save to a file or copy a clipboard, if that's what you mean. You could start swappy either way:
The reason to not give a path directly to Another thing you can do to get feedback that you've saved or copied the file is to enable |
@markstos I want to know which of the two buttons on the top right (save or copy) were clicked by the user |
If user clicks the copy button I want to be able to send a notification to the user "Image copied to clipboard" and if they click the save to file button I will send the notification "Image saved to <path>" |
If you choose one workflow or the other, then you can you have that now, without waiting for someone to code up another solution. For example:
|
I specifically want to be able to send a notification based on what action the user took (past tense). Your solution afaict is assuming what the user will do before swappy has been opened. |
Similar to #119 but providing a command to be run on image copy rather than image save, either via config file or via CLI args.
This would allow emitting a notification if I have copied to clipboard. This would be nice in combination with #119, to have different notifications in the two different success scenarios.
Example:
swappy --on-copy 'notify-send "Copied to clipboard"' ...
The text was updated successfully, but these errors were encountered: