-
Notifications
You must be signed in to change notification settings - Fork 8
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
Working on extending displayz
to other platforms.
#2
Comments
Hi, sounds like a cool project, and maybe even what I initially intended for displayz to become! I like the idea of making displayz cross-platform - though I don't have the time to implement this right now. If you want to go for it, feel free to open a PR; I am quite open for this change and will continue to support the Windows part of displayz. Not sure if the display models of other OS are similar to the Windows one (I would guess not), so abstracting this could be quite challenging. Cheers |
@michidk I've pushed my branch to my fork and created a draft PR to collab on. I wasn't sure what API you wanted to use for #1, so I need some input before I work on abstracting it away. The abstracts are currently in I wanted a cross-platform display output manager, and with The display models are vaguely similar on Linux - I don't own a Mac. |
- Bump Cargo.lock and dependencies. - Use `cfg_attr` to expose platform-specific APIs in the `platform` module, then export with `pub use`. - Create initial `common` module for abstracting displays. - Make examples only run on Windows - pending refactoring of Windows backend. - Add lints. See michidk#2 for issue.
Don't worry regarding #1. I have to investigate this first, but I think it has not changed too much.
Then let's focus on Linux and Windows. I added some comments to your draft PR. |
Just chiming in to say great work so far, the proposal looks nice. Some additional input from me, i like the central trait which all os/managers share. If any of them have specific functions which is specific to that os, we could structure it like the I might be interested in doing the linux/x11 implementation if that is ok with you @shymega. This might be just the thing i need for my personal project :) |
Also i don't know if that would be in the scope of this issue/pr, but i would also like to have a "write" api.
|
Thank you, I like the idea of that With regards to Linux/X11, you can see in 043a77b, there's flags for X11 and Wayland. I'm open to you working on X11 - I can grant you access to a branch on my fork, where I can test your changes, and rebase them into the You should be able to see the abstractions in the |
I think it is within the scope. I would be open to having this available in the API, but maybe we should focus on the "Read" API first, then writing. |
Turns out FreeBSD supports Wayland, so I've renamed I'm currently working on Wayland support. I'm using this tool (Shikane) as a guidelines, but not all of it. It's something I took inspiration from, as well as |
- Bump Cargo.lock and dependencies. - Use `cfg_attr` to expose platform-specific APIs in the `platform` module, then export with `pub use`. - Create initial `common` module for abstracting displays. - Make examples only run on Windows - pending refactoring of Windows backend. - Add lints. Ref: #michidkgh-2.
- Bump Cargo.lock and dependencies. - Use `cfg_attr` to expose platform-specific APIs in the `platform` module, then export with `pub use`. - Create initial `common` module for abstracting displays. - Make examples only run on Windows - pending refactoring of Windows backend. - Add lints. Closes #michidkgh-2.
- Bump Cargo.lock and dependencies. - Use `cfg_attr` to expose platform-specific APIs in the `platform` module, then export with `pub use`. - Create initial `common` module for abstracting displays. - Make examples only run on Windows - pending refactoring of Windows backend. - Add lints. Resolves #michidkgh-2.
- Bump Cargo.lock and dependencies. - Use `cfg_attr` to expose platform-specific APIs in the `platform` module, then export with `pub use`. - Create initial `common` module for abstracting displays. - Make examples only run on Windows - pending refactoring of Windows backend. - Add lints. Resolves michidk#2.
OK, so I rebased the PR a little, gonna squash some things soon. @michidk @Shemnei I've granted you both access to my fork as collaborators. Please let me know if you rebase on the I've got rust-analyzer working with the Wayland crate, so I can begin adding the implementation. I need some input on the Thanks! |
Sorry, haven't worked on this for a bit. I'm trying to decide on the best way to define the |
Update from my end - I've recently discovered that some, but not all compositors, use a different set of APIs. I've found that wlroots has the WLR output management protocols - that's one. Then, there's KDE and GNOME. KDE have Rust bindings; haven't found any for GNOME yet. I'm wondering if there's more upstream work that needs to happen... |
Hi,
I'm working on a Rust, cross-platform (Windows, macOS, Linux/BSD) profile-based display output manager. It's event-based but also can be controlled with JSON-RPC.
displayz
looks perfect for Windows, but I found myself duplicating efforts in my usage of this crate.I thought, maybe, it might be a good idea to work on creating a generic
DisplayOutput
trait fordisplayz
, that, when combined with thetarget_os
attribute, can provide platform-specific implementations of the display outputs.To give you an idea of how I picture a
DisplayOutput
trait, here's some code I wrote, and then realized I was duplicating efforts, for automon:I'd really like to work on adding the modern API (but also maintaining backwards-compatibility, if possible) with you, and extending the scope of
displayz
to macOS, Linux, and BSD.What do you think?
Have a great weekend! :)
The text was updated successfully, but these errors were encountered: