Skip to content
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

[Feature] Windows related improvements #112

Open
rashil2000 opened this issue Dec 29, 2021 · 4 comments
Open

[Feature] Windows related improvements #112

rashil2000 opened this issue Dec 29, 2021 · 4 comments

Comments

@rashil2000
Copy link

Hi!

I've recently started learning Rust, and I'd like to help out by improving macchina on Windows. I have a decent background in fetching system information - I'm a maintainer of winfetch (you might remember me from this thread).

This is the current state of macchina on Windows:

image

I believe the Packages readout was fixed recently - #105, #107.

But from the remaining 8 warnings, 5 readouts, namely Terminal, Shell, Backlight, Resolution and ProcessorLoad are relevant and possible to implement (and fairly easy too, at least from a CLI perspective, not sure about the Rust implementation since I'm new to it).

I see that the wmi dependency was recently added - #97. This is great! WMI contains a goldmine of information and we use it heavily in winfetch1.

For both Resolution and Backlight, we can use WMI - see here and here.

I will try to implement the Backlight function first.

Footnotes

  1. 10 function calls to Get-CimInstance as of now.

@grtcdr
Copy link
Member

grtcdr commented Dec 29, 2021

Thank you for offering to help ❤️

I certainly would love to see more and more readouts get implemented for Windows, as its current state is pretty unfortunate, to say the least... I am very confident though that the Windows implementation will only improve over time, since we've got @FantasyTeddy helping out.

I personally can't promise to work on Windows, but I am around (most of the time) to answer any questions, and review any PRs you might send our way.

@grtcdr
Copy link
Member

grtcdr commented Dec 29, 2021

Before you start hacking away at libmacchina, I highly suggest that you take a look at #110 and to tell us your thoughts. If the RFC succeeds to convince our contributors and team, #111 will be merged and it comes with a truckload of API breakages and an entire/major refactor of the codebase.

@rashil2000
Copy link
Author

I tend to agree with this comment there:

In other words, application developers that are interested in libmacchina can either use all the readouts we offer (by default), or cherry-pick the readouts they want to use.

Since libmacchina was originally intended for use with macchina itself (I assume), it'd be good to have everything available as default, with the ability to selectively turn off features if developers require.

@grtcdr
Copy link
Member

grtcdr commented Dec 30, 2021

Yeah, that is currently how it works in #111, I'll drop a video of the progress so we can visualize the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants