-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate logic into crate? #6
Comments
Thanks for the compliment and suggestion. This doesn't sound like a bad idea at all, I'll look into it when I can. |
I'll need more details on what you actually expect from the separate crate. I've glanced at my code, and most of the logic is for processing user input. The rest is a very thin wrapper around Xlib, and copying buffers around. |
I imagined something high-level like let mut display = Display::new(":0");
let image = display.capture_window(<id>); // returns struct with: width, height and byte vec (But it's completely up to you) |
Any news on this? |
Well as I've said before, I'm not sure what kind of API I should provide. The problem is more complex than the proposition above, but also still trivial enough to make a library crate unnecessary. I think the best I could do would be exposing the same parameters as the command-line interface, and returning a struct from the Image crate, but that's a major refactoring. Another major blocker is that I don't use shotgun anymore, as I've switched to Wayland, and I'm not interested in doing this either way. I will gladly review a pull request implementing the above though. |
@9ary Oh, why did you switched to wayland? Which wayland do you use? Do you have any issues? How was it? |
I'm using sway. The main motivation was extremely poor performance and a buggy experience with Intel graphics on my laptop, as well as the lack of a good compositor for X. sway solves all of this. |
@9ary Ah, I am interested to hear more, I also use Intel on my side. Let's take this offline, maybe on telegram chat later. |
I'll close this as you're right, the crate might be too small if you extract out all argument handling |
Hey! This looks really cool! Any chance you could separate the logic to a separate crate so people could use it in their own applications?
The text was updated successfully, but these errors were encountered: