openSUSE / openSUSEway

dotfiles for Sway on openSUSE
MIT License
82 stars 17 forks source link

Add swappy options to screenshot mode menu #164

Open FilippoBonazziSUSE opened 2 weeks ago

FilippoBonazziSUSE commented 2 weeks ago

Discussed in https://github.com/openSUSE/openSUSEway/discussions/157

Originally posted by **FilippoBonazziSUSE** March 19, 2024 I recently found the need to edit a screenshot after it has been taken, adding text, arrows, colours etc. like one does all the time on their phone for example. [swappy](https://github.com/jtheoof/swappy) can do it quite well. I am makinig a note for myself to provide a configuration for this in openSUSEway and offer it as an option in the [screenshot mode menu](https://github.com/openSUSE/openSUSEway/pull/131) when I have time.
FilippoBonazziSUSE commented 2 weeks ago

This is kind of tricky to provide in the general case, as swappy saves the resulting image in two places depending on how it's used:

  1. it saves the image to somewhere specified by a -o option (which can be stdout, which would make it play nice with grim) upon exiting the program
  2. it saves the image to somewhere specified by the save_dir configuration value (no CLI option), which defaults to $HOME/Desktop if the "Save" button is pressed

This difference is undesirable for the user, which would conceivably want to have all their screenshots end up in a single folder. We have deferred setting a default screenshot folder so far (#139), but the issue now would become unavoidable. To use swappy in a coherent manner, we would need to set the same screenshot destination folder (whatever it is) to be used by grim AND by swappy when using the "Save" button.

Since this is becoming so tricky, I don't think I can get this done by next week in time for the conference. @denisok FYI