Upstream Present Windows Widget
Open, Needs TriagePublic

Description

I need to upstream this widget for D24223.

https://github.com/Zren/plasma-applet-presentwindows

  • Rename to org.kde.plasma.presentwindows.
  • Conform to code guidelines. Convert tabs to spaces. Add a bunch of semicolons.
  • Upstream "presentwindows" icon to breeze-icons which is a trace of the "task view" icon from Windows 10. The icon does not animate like it does in Window when the "effect" activates.
    • I made the SVG, but it's obviously a copy. Windows doesn't even use this icon anymore.
    • https://commons.wikimedia.org/wiki/File:Windows_10_Task_View_Icon.svg
    • Wikipedia's licensing bit: "This image consists only of simple geometric shapes or text. It does not meet the threshold of originality needed for copyright protection, and is therefore in the public domain. Although it is free of copyright restrictions, this image may still be subject to other restrictions. See Fonts and typefaces for more information."
    • https://commons.wikimedia.org/wiki/File:Windows_10_Task_View_Icon.png
    • The PNG does have a disclaimer the SVG does not: " This work includes material that may be protected as a trademark in some jurisdictions. If you want to use it, you have to ensure that you have the legal right to do so and that you do not infringe any trademark rights. See our general disclaimer."
  • The Unity7 icon may also be protected, though Unity7 is FOSS. I personally turned it into a vector image from a screenshot.
  • Maybe write a C++ object to call a dbus function instead of abusing the executable dataengine.
    • This could be refactored later.
    • The function would also need to be asynchronous as we need to read the reply. The config needs to know if the Desktop Effect is active to display the checkbox.
    • qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "ExposeAll"
    • readStateCommand: 'qdbus org.kde.KWin /Effects isEffectLoaded ' + effectId
    • toggleStateCommand: 'qdbus org.kde.KWin /Effects toggleEffect ' + effectId
  • Maybe write a C++ object to call the kwriteconfig5 --file ~/.config/kwinrc ... to write to file, OR fix the "bug" in KWin that doesn't persist the "enabled" state when a effect is toggled via dbus. I'd need to confirm this "bug" still exists since it was first noticed in 2017.
  • Rewrite all my "no-click-apply" checkbox/form controls in the config to require the user to click "apply".
  • Change tristate checkbox to dropdown to follow VDG.
  • Possibly upstream the "ConfigIcon.qml" concept to plasma-framework/src/declarativeimports/ so widgets don't need to reinvent the wheel every time.
Zren created this task.Sep 26 2019, 1:46 AM

Possibly upstream the "ConfigIcon.qml" concept to plasma-framework/src/declarativeimports/ so widgets don't need to reinvent the wheel every time.

That's a good idea; Kickoff already does this, so hopefully both it and Present Windows can use the same code from whatever gets added to plasma-framework.

Maybe write a C++ object to call a dbus function instead of abusing the executable dataengine.

There's no maybe about that :)
I'm sure we can make something.


Does it really need a whole new applet, or can the existing show dashboard widget just have N different operating modes?

show dash / minimise all / present windows

This can be either one applet with 3 .desktop files so they look like 3 unique applets to an end user or one with a config UI.

Zren added a comment.Oct 9 2019, 7:04 PM

This widget has 2 looks. Windows TaskView Icon or "Unity desktop pager" look.

It also has 4 different actions: "Expose all windows", "Expose current desktop", or "Expose Application", and finally "Desktop Grid".

"Minimise all" is for hiding windows, while this widget is for "selecting a window". It's "Alt+Tab" for the mouse.

Zren added a comment.Oct 9 2019, 7:14 PM

We don't reuse much code besides it being an "icon button" button. We'd have to wrap most of the minimize/showdesktop code in a conditional. We'd have to disable the drag and drop activation for "present windows" mode.

https://github.com/KDE/plasma-desktop/blob/master/applets/minimizeall/package/contents/ui/main.qml