Add copy filepath to clipboard action
Adds a new action that copies the saved file path to clipboard. Useful when you need to quickly reference where the screenshot was saved.
- New action: copy-filepath-to-clipboard
- Keybind: Ctrl+Alt+C
- Auto-saves if file wasn't saved yet
- Works with wl-copy and native GTK clipboard
Can be used in actions-on-enter, actions-on-escape, etc.
Tested on my system and works well. Let me know if you'd like any changes!
Nice idea, thanks! Might be a bit before we get round to reviewing this.
I'm wondering if this needs to be a dedicated action, perhaps we should just always copy the filename when saving to file? Does anyone see any reason why we wouldn't want to?
If both are coupled, I think it would be best if there was a config to split them I personally can see myself saving to file and not wanting to update my clipboard
OK, maybe a separate action is the way to go.
@Iann29 I do have a few remarks:
- I think the action should do just that: Copy the last used filename to clipboard, and if there is none, do nothing (or maybe log/notify there is none, I'd be fine with that). No auto-save. This should simplify this change a bit.
- I think
copy_text_to_external_processandsave_to_external_processcan be deduplicated. This requires a small change tohandle_copy_clipboard, but that'd be fine. Can you try, please? - It would be great if you could add the new shortcut to README.md, along with
<sup>NEXTRELEASE</sup>(The latter creates a dependency on #322) - Please use
make fixto make the fmt task happy. Thanks :)