Open tsujan opened 3 years ago
This needs a lot of work:
batterywatcher.cpp
and, probably, inserted into powermanagementd.cpp
. If there is no battery or if the battery watcher is disabled, the tray icon should be changed to the icon of power management (an internal icon or from the theme, depending on the settings).I might start to work on it after https://github.com/lxqt/lxqt-powermanagement/pull/260 is merged.
I think we should take some time to have a good approach. I was thinking about an "Laptop" section, where Lid and Battery monitor would go. It could even non be visible when there is no lid and no battery. Just an idea this.
I think we should take some time to have a good approach.
The changes to the main code weren't as complex as I thought at first but I agree that we should find the best design in the settings code. That will require a discussion; it'll take time.
I just tested, removing battery when laptop is plugged in AC doesn't trigger anything, reinserting it either, restart session does disable battery monitor, restart powermanager probably too.