Power icon indicating copy to clipboard operation
Power copied to clipboard

Requested pull request..

Open oskarirauta opened this issue 10 years ago • 8 comments

Here you go - hey, I made the changes to setup.py that you requested.....

oskarirauta avatar Nov 09 '15 19:11 oskarirauta

Updated..

oskarirauta avatar Nov 09 '15 20:11 oskarirauta

@oskarirauta Why did you need to remove implementation for other platforms?

Kentzo avatar Nov 10 '15 05:11 Kentzo

If you want to exclude them for packaging, it should be possible by modifying setup.py to read some external variable and exclude inclusion of unneeded files. So there won't be any need for multiple forks.

Kentzo avatar Nov 10 '15 05:11 Kentzo

I excluded them because I worked only with Linux version, you see, I changed it fundamentally, it is no longer "compatible" with previous releases since I "renamed" one of key functions. And even return no longer is compatible. This is why I made a version bump.

Second, the reason for excluding: I only worked with Linux, since that was only platform I at the moment can test (although, I do have OS X platform and Window 10 "available" but at the moment, they are utilized in a way that I'd better not to tamper with them). To tell you the truth - I didn't even look at them, since I can't provide any testing. Tell you what, if you want to make an "official" v1.5 based on my work; I am more than happy, since I provided this for another project (adeskbar update 0.5.1 -> 0.5.2, also on my repository, battery applet uses this module).

But unfortunately I am not able to provide similar updates for another platforms, so I cannot fulfill that. If other platforms receive same information, you could update them and use my math, or even better, see if you can make it even shorter code, since it's no doubt, that you are far more better with Python than me, after all, this is 3rd time in my whole life that I use python (ofcourse, I've used it more, but now we talk about creating or changing something)..

So I kinda excluded them because I felt there was no choice since I cannot provide the same for other platforms.

Edit: Err.. when I told I have windows 10 and OS X available, they cannot be used for this, since they don't utilize a battery.

oskarirauta avatar Nov 10 '15 11:11 oskarirauta

OS X(darwin) version holds these keys that possibly can be used: status: kIOPSACPowerValue kIOPSPowerSourceStateKey kIOPSIsPresentKey kIOPSIsChargedKey kIOPSIsChargingKey kIOPSIsFinishingChargeKey time_remaining: kIOPSTimeToEmptyKey kIOPSTimeToFullChargeKey capacity: kIOPSCurrentCapacityKey kIOPSDesignCapacityKey

But I have no idea how these work and what they contain so cannot say how to use the information. I didn't find anything similar for freebsd or win32 from source.

oskarirauta avatar Nov 10 '15 11:11 oskarirauta

@oskarirauta It should be possible to extend version for linux with functions you need while preserving common interface and logic this package has and making it compatible with modern version of linux.

If you need some more methods for linux only, just add them to linux.py

Kentzo avatar Nov 11 '15 00:11 Kentzo

I'm willing to merge this PR if anyone can make it so it won't break implementations for other platforms.

Kentzo avatar Jan 10 '16 15:01 Kentzo

It's more the situation that the module won't work in the future for anyone...

kootenpv avatar Oct 28 '17 14:10 kootenpv