Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter power management without battery #261

Open
tsujan opened this issue Apr 22, 2021 · 4 comments
Open

Smarter power management without battery #261

tsujan opened this issue Apr 22, 2021 · 4 comments

Comments

@tsujan
Copy link
Member

tsujan commented Apr 22, 2021

  1. Battery idle time and backlight change on battery discharge are enabled without battery.
  2. There's no way to have a tray icon without battery. The tray icon is (or will be) useful for pausing idleness checks. It can also show that the power management exits.
  3. Does LXQt Power Management react to the removal or adding of battery?
@tsujan
Copy link
Member Author

tsujan commented Apr 22, 2021

This needs a lot of work:

  • A separate section is required for the tray icon in the settings dialog.
  • In that section, the icon preview should show the battery icons if there is a battery; otherwise it should show a power management icon. Since we have a theme option, a separate power management icon needs to be added to the code.
  • The tray icon should be removed from 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 #260 is merged.

@tsujan tsujan changed the title LXQt Power Management has problems without battery Smarter power management without battery Apr 22, 2021
@stefonarch
Copy link
Member

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.

@tsujan
Copy link
Member Author

tsujan commented Apr 22, 2021

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.

@stefonarch
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants