desktop
desktop copied to clipboard
enhancement: desktop sync option to pause when on battery
Expected behaviour
When on battery, nextcloud can consume significant amounts of energy to synchronise files. A possible improvement is an option to disable nextcloud sync when the client is on battery to save energy.
Actual behaviour
Nextcloud sync when on battery which may reduce client lifetime
Operating system: All
The idea is neat, though I suspect it's not as small an issue as it sounds.
As far as I can see, Qt has no direct way of accessing a device's power status. Thus, one needs to go via system libraries, which is a bit of work. The WinAPI has GetSystemPowerStatus, on Linux one can use D-BUS (here's an example), I don't know about Mac OS.
Would it be better to use this issue to create a battery notification API in QT then? But yes, it seems simple, but I'm sure that like anything in programming it's never as easy as it looks :)
FYI MacOS does have this API through https://developer.apple.com/documentation/iokit/iopowersources_h (I'm on macos, so this is the one I care about)
there are lot of similar discussions about pause sync on mobile connections #39 #1710 - maybe it's worth to discuss all the conditions which are expected to pause the sync (battery, metered connection, specific times) and find an approach to improve all this areas at once?
This issue, especially pausing on metered connection is soooo important. Please start with a simple implementation first.
Maybe a workaround would be a local proxy software capable of detecting a metered connection?! If someone knows any?