Bug 476921 - Pressing Meta+B should cycle through all modes in Power OSD
Summary: Pressing Meta+B should cycle through all modes in Power OSD
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.80
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Fabian Arndt
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-13 05:58 UTC by Jin Liu
Modified: 2024-09-10 20:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2023-11-13 05:58:16 UTC
SUMMARY
Rationale:
1. Most OSDs in Plasma works this way: sound, brightness, window switcher. Seems KScreen is the sole exception.
2. OSDs in other platform, e.g. Windows, works this way.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.6.1-arch1-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 2 Bug Janitor Service 2024-08-20 20:46:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/416
Comment 3 Jakob Petsovits 2024-09-10 20:05:47 UTC
Git commit 4ef20b2160b47a70764fff57e9a273f9e5ecf0f0 by Jakob Petsovits.
Committed on 10/09/2024 at 12:01.
Pushed by jpetso into branch 'master'.

Cycle through power profiles on Meta+B with non-interactive OSD

The interactive OSD implementation from MR !186 was a lot of work,
but little discussion happened at the time about whether it should
be interactive at all.

Arguments have since been made that the low number of selectable
power profiles, and the non-destructive character of switching
between them, would make power profiles a better fit for immediately
switching profiles on shortcut presses with a non-interactive OSD.

This commit implements simple power profile cycling on Meta+B in
the PowerProfile action, and uses the Plasma OSD service's
pre-existing "powerProfileChanged" method to display a
non-interactive OSD popup once the profile was applied.

In turn, the entire interactive OSD service can be deleted
from PowerDevil, reducing complexity. The corresponding global
shortcut definition moves from PowerDevilApp to the PowerProfile
action, similar to global shortcuts from other PowerDevil actions.
(This makes PowerDevil shortcuts actually show up in the Shortcuts
KCM as "Power Management" rather than the default app title from
KAboutData called "KDE Power Management System".)
Related: bug 469487

M  +0    -9    CMakeLists.txt
M  +42   -10   daemon/actions/bundled/powerprofile.cpp
M  +9    -6    daemon/actions/bundled/powerprofile.h
M  +0    -18   daemon/powerdevilapp.cpp
M  +0    -1    daemon/powerdevilapp.h
D  +0    -28   osd/CMakeLists.txt
D  +0    -6    osd/Messages.sh
D  +0    -23   osd/main.cpp
D  +0    -9    osd/org.kde.powerdevil.powerProfileOsdService.xml
D  +0    -85   osd/osd.cpp
D  +0    -47   osd/osd.h
D  +0    -29   osd/osdaction.cpp
D  +0    -35   osd/osdaction.h
D  +0    -102  osd/osdmanager.cpp
D  +0    -39   osd/osdmanager.h
D  +0    -12   osd/plasma-powerprofile-osd.service
D  +0    -6    osd/qml.qrc
D  +0    -140  osd/qml/OsdSelector.qml

https://invent.kde.org/plasma/powerdevil/-/commit/4ef20b2160b47a70764fff57e9a273f9e5ecf0f0