Remove slurp as a dependency, aka fork slurp to rust.
So a bit of background: I was making a replacement for grimshot, basically by shelling out via rust instead.
I think you're actually 90% there, so maybe I'll just try to implement slurp functionality. Can you recommend any good resources for understanding these wayland and wlroots protocols?
Not sure if I should start with trying to draw a rectangle (for the selection box) or detect mouse events (to select things).
Hi!
So a bit of background: I was making a replacement for grimshot, basically by shelling out via rust instead. I've already created a port of grimshot to wayshot and slurp (https://github.com/Shinyzenith/.dotfiles/blob/master/.config/bin/bin/swappyshot)
I think you're actually 90% there, so maybe I'll just try to implement slurp functionality. Can you recommend any good resources for understanding these wayland and wlroots protocols? Sure!
-
I'd suggest you learn how wayland clients function if you don't know that already. Wayout (https://github.com/waycrate/wayout) is a fairly simple output management client I wrote, this can help you learn.
-
https://wayland.app is your best friend. It makes reading the protocol specification much easier.
-
Wlroots itself ships an example for the layer shell protocol. For forking slurp you'll need to work with layer shell and xdg_output_manager protocols :) https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/examples/layer-shell.c
-
Last but not least, you're gonna have to read https://github.com/emersion/slurp.
Not sure if I should start with trying to draw a rectangle (for the selection box) or detect mouse events (to select things).
- Starting with a box would be the first step, the layer shell example I linked above showcases a rectangle if my memory serves me well.
For interested individuals -- this has been completed and we are going to integrate it soon