-
Notifications
You must be signed in to change notification settings - Fork 27
Power profiles #426
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
Power profiles #426
Conversation
Added a disabled action in case the interface is not available. @tsujan @stefonarch @libalis There is still one minor point.... do we want to support the profile names translation somehow? As those texts/names are fully dynamic and provided by the power-profile-daemon, so we have no control what can come in. |
Is there a standard way? |
The power profiles now actually responds to external conditions — great job! |
These things are related to icon sets. Apps shouldn't be bothered by them. |
Is there some sort of list of all possible values? It would be nice to have translations, here I've "balanced" and "power-saver" only. |
As an app developer, you can select a reasonable default. |
The most relevant icon is chosen here: |
It's also possible to choose a different icon set only for the panel. |
Didn't know that was the selected icon, if you want to stick to the xdg standard that's probably a really good choice, sorry.
This doesn't work for individual widgets, but no problem, thank you! |
f8eeb16
to
4c20dca
Compare
..to leave the under-the-hood algorithm be driven by QPA platform theme.
The power profiles setting is made available by freedesktop's power-profiles-daemon. We just provide basic functionality in case DBus interface is available in runtime.
We have no control over the profile names returned by power-profiles-daemon. We have just added basic profile names as seen being used.
Added basic translation support -> just profile name strings of power-profiles-daemon I've seen in my setup. Now, I believe, this is read for final review/merge. |
Closes #425 |
Please remove the |
What's the problem with updated ts files? @stefonarch would update it the same way. |
The advantage: A much cleaner and readable patch that contains only the relevant changes. That's why the translation PRs are always made separately (by @stefonarch). |
mActions.reset(nullptr); | ||
mMenu->addAction(tr("power-profiles-daemon not available"))->setDisabled(true); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little uncomfortable about showing the new menu-item when power-profiles-daemon
isn't available. This may pretend that power-profiles-daemon
is preferred by LXQt, while many users may install tlp
, which is in conflict with it.
IMHO, this deserves a discussion before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we don't necessarily depend on power-profiles-daemon, but on provided DBus service. Should we rather use org.freedesktop.UPower.PowerProfiles DBus service not available
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
power-profiles-daemon
is an actual package that the user can install to fix the problem, so it is much more user friendly imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rather use …
Too technical.
Why not hiding the menu-item instead?
EDIT: I mean the Power Profile menu-item, not just its submenu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a good solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not hiding the menu-item instead?
OK. Done
@libalis |
Very good illustration, thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GTM, as far as I'm concerned.
If you've tested it, please merge it — it'll be a nice feature in 2.2.0 — if not, @stefonarch will be available after April 15 and could test it.
I'm not completely unavailable, for such a nice thing, will test it this evening but I'm confident. Translations have first to be committed in weblate, to avoid conflicts. I'll do all of them 15/16 April |
We have time until April 17 — but not a day later ;) |
No big issue but I never can build packages with your PRs directly ;) |
The power profile menu will only be available in a system with a battery. Systems without a battery (desktops) can also benefit from power profiles. Well, the all tray icon functionality becomes unavailable if the the system doesn't have a battery. |
I already made next PR for that #428 |
Heh. As I'm using dash as word separator in branch names and your build doesn't like it as it wants to use the branch name in version string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine.
As of now: quick proof-of-concept to agree if #425 implementation would be reasonable from the user perspective and lean enough from developer perspective to include this feature into LXQt.