dshoreman / nextshot

A simple tool for taking screenshots on Linux and sharing via Nextcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding arrows to the screenshot

bodryj opened this issue · comments

We really need to add arrows to the screenshot. Also, when creating a menu, fill or copy to the clipboard

Hi @bodryj, thanks for your suggestions. I've quoted the first one last as my response got a bit long, sorry for any confusion!

When creating a menu, fill or copy to the clipboard

If I'm understanding correctly, copy to clipboard in the tray menu is a great idea for Hacktoberfest. Would you mind creating a dedicated issue for it with more detail? There are a few ways it could be implemented so I'd like to get your thoughts about how it should work (eg config vs cli flag vs extra menu items etc).

We really need to add arrows to the screenshot.

It could be difficult using pure Bash, but it might not be impossible... Are you using any tools for arrows currently? I wonder if an Open in editor option might be helpful as a workaround so that you can edit the screenshot before it's uploaded or copied to clipboard.

What could be possible with Bash is a combination of yad/slop/imagick. If we created a Yad window with some buttons and an image viewer, slop could be triggered when an arrow button is clicked. When you click on the screenshot, the geometry returned from slop could then be used in a magick command that overlays an arrow onto the image at a certain angle. Building on that, if slop was called twice we could define both the start and end points, setting the arrow length accordingly. PRs are open if you fancy a challenge!


In the more distant future, support for GUI features could be done in a separate package. Using Go (or Rust if I learn it) would provide various libraries that can be used for better/easier tray and annotation support, but that's a topic for another issue...