I really like the screenshot app on Fedora. It works flawlessly but sometimes I drop screenshots into graphics program (Gimp) to draw arrows, etc. Would be really nice if everything was integrated together.<p>I programmed in Basic in the 80' and 90' and Pascal/Delphi in early 00'. After that Python and Django for the usual web stuff. It's been awhile since I did major projects - mainly Python scripts now if needed (scraping and data)...If I would to build this kind of app from scratch where do I start?
As far as I know, this is not part of wayland core, namely you would need an specific and out of core wayland interface <i>AND</i> a wayland compositor which supports such interface.<p>Go to the wayland authority repo for interfaces, see if there is such interface (there could be many in dev), then find a wayland compositor which supports such interface(s) (or code such compositor). Then write your app code to query if a wayland compositor supports such interface:<p>- if not, gracefully fail.<p>- if it does, screenshot your surfaces.<p>That said, it is more an internal feature of a wayland compositor itself. So it seems more appropriate that a wayland compositor supports or not such feature, and if so, optionaly allows an application to remote control of feature via a specific out-of-core wayland interface.<p>I would feel better if it stays into the wayland compositior without the possibility for an external apps to snapshot everything.<p>That said, you could fiddle with platform specific stuff to shorcut the wayland compositor (on linux, drm mode settings and framebuffers).
Have you seen flameshot? <a href="https://flameshot.org" rel="nofollow noreferrer">https://flameshot.org</a><p>I haven't used it personally - I hacked together a Guile script to wrap a few tools (grim, slurp, tesseract for OCR..., wofi), and then bound my script to a shortcut in my WM.
Probably start with wlroots if you want to target multiple Wayland desktops. There are multiple compositor implementations now, so grabbing a framebuffer isn't quite as easy as it was in the 90s.<p>You should check out Flameshot and Spectacle if you want feature-complete screenshot apps on Wayland. If <i>those</i> don't suit your needs, then you should consider a custom solution.