Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Add support of nvidia graphics using nvidia-smi

Open voidThread opened this issue 9 months ago • 3 comments

Hi! I've introduced the new module which pulls data from the external 'nvidia-smi' program. The module runs 'nvidia-smi' as a forked process and saves GPU monitor data into the exchange file. If not specified in the configuration file, the file is created in the system's temporary directory. You can define your own exchange file, but you must ensure that it exists and has proper privileges set. Since this is my first contribution here, I'm eager to receive feedback on any areas that could be improved.

voidThread avatar May 08 '24 14:05 voidThread

I'm not one to comment on this really and I can't test it unfortunately, but from a quick skim of the code and the assumption that you've tested it too work on your machine; great work, looks like you've done a really good job with this.

I can give you a heads-up about the man pages, it's probably going to get requested that you add some documentation for how to use this if it is to get merged.

Some kind of conditional include in the build step, like what's done with the cava module (if you search "HAVE_LIBCAVA" and follow the trail, you can try to do something similar) would also probably be nice. I'm not sure what's possible, should probably have lead with I'm pretty bad at C++.

haug1 avatar May 09 '24 14:05 haug1

Thanks, @haug1 ! I've been using this for a few days without any problems. Also, I've added what you proposed.

voidThread avatar May 10 '24 11:05 voidThread

I didn't think of this yesterday, sorry. But this might be simply and more correctly achieved for users with a custom module instead so to manage the scope of the project and therefore not interesting to merge. Again, I'm not really one to comment on this. Just thinking out loud. :)

haug1 avatar May 10 '24 18:05 haug1

Yup, like @haug1 said, theses specific modules, as pretty simple should be done in a custom module :)

Alexays avatar May 28 '24 07:05 Alexays

Sorry to have added work on you with my first comment @voidThread, that was not my intention. Just wanted to give some feedback, but didn't think it through until later.

(Also, sorry to that other guy I accidentally tagged.)

haug1 avatar May 28 '24 18:05 haug1