yasu - devlog #1
Yasu is an acronym of yet another screenshot utility, I was thinking a lot about the name and that’s what I’ve come up with.
Why?
I’ve been playing a lot with Linux on my servers, but never used it as a main operating system on my desktop. Recently, I finally moved over and I can say that I’m a happy user of openSUSE with KDE Plasma.
But there is one aspect, that annoys me. I love the screenshot app from Windows 11 available under Win+Shif+S shortcut, and none of the popular Linux equivalents satisfies me. Spectacle from KDE is slow and bloated with too many features and buttons, I just want to make a screenshot that goes into my clipboard without thinking which button to click. Flameshot is just OK, but in its design it’s similar to Spectacle.
To be honest, I’m not a fan of screen capture app on macOS too. So maybe later I will add the support for Apple devices. It will not be that hard, because I’m using my own abstraction layer over system’s screenshot function, so I’m going to have implement only that part of the code again.
So, that’s how my idea has born.
Implementation
For this project I went with C++, and no, I’m not using Qt like Spectacle or Flameshot. I’m planning to use OpenGL via GLFW with ImGui for the screen capture UI, and GTK4 for small settings app.
One of my other requirements, is that I want this app to be available on all Linux distros, regardless of the display server (X11/Wayland), desktop environment is (GNOME/KDE) or window manager (Hyprland etc.).
I don’t have any experience in writing apps for Linux, but after a quick research I found that the best solution for me is use of XDG Desktop Portal, and it’s made by Flatpak, so I’ve instant support for it. Double win I can say.
As I’ve said earlier I’m writing my own abstraction layer over native’s screenshot function. So I will be able to implement it both for Linux and later for macOS. And maybe even Windows in the future…
What I’ve done in the past few hours?
I’ve set up the project with Meson as a build system, and…. I’ve captured my first screenshot! Take a look at it. In the first place I tried to use ScreenCast because it’s gives me much more freedom, but finally due to technical reasons I picked Screenshot, main disadvantage of it is that me as a program, receive an URI to a file on a disk, instead of a raw pixels on screen like with ScreenCast. But for the user, it’s much more friendly and safer in terms of application’s permissions. Also, I’m going to have much less compatibility issues later. And also, the given capture, contains all monitors in one image, so I’ve to separate everything by loading the image into RAM, then calculating where is each monitor with GTK, and finally I crop everything with gdk-pixbuf, so I’m left with separate image for each monitor.
Now I’m going to focus on writing the abstraction layer, because I haven’t finished it yet. And after I’ll probably move straight forward to implementing the window with GLFW.
That was a lot of text, more than I would assume. I hope someone is really going to read this. 😉
Oh, and I’ve made amazing logo in Figma, hope you like it!