Closed kammererN closed 2 weeks ago
There is currently only a volume control icon implemented, battery and network icons need doing.
I am currently learning C and would be interested in implementing this. It would be my first open-source contribution, so it will likely take some time.
Would a good course of action be to copy templates from the volume control icon and go from there?
I would first start by making a very simple C application to basically just print like the current battery level? To make sure you have the core logic for detecting whether a battery is present, and that you can monitor changes (charging, discharging, etc.)
This may mean reading from something under /dev
, or perhaps calling upower
? (I don't know how portable the latter is... try to find what seems like the most portable solution/minimal dependencies)
Once you have the battery logic working, then make a start on integrating it with the taskband
Feel free to ask any questions if you get stuck! The gist of the notification icons atm is that the systray creates the icon in the UI, and then maps a 'behaviour' to it (so the systray manages the UI, and the behaviour contains all the actual logic for that particular icon)
Have a look over how the volume icon works, hopefully it is straight forward enough!
Wondering if there is any way to display the battery power of a laptop on the taskband. I am running wintc-taskband as a start application, and am working on disabling the XFCE taskbar.
If no such battery power display exists, I would not be opposed to working on developing a port for this feature.