RFC: "Add Widget" runner
AbandonedPublic

Authored by broulik on Jul 27 2016, 8:36 AM.

Details

Reviewers
None
Group Reviewers
Plasma: Design
Plasma
Summary

This runner allows to find all Plasma widgets and adds them to the desktop.

Test Plan

Suggested by Eike. The widget is added to the desktop where the mouse is (was easiest solution as a runner doesn't know (and shouldn't) where the krunner window is but this is close enough). The widget can also be dragged from krunner to anywhere (eg. to a panel).

The code is adapted from the windowed widgets runner and perhaps we could merge the two, even.

There's a bit of an overlap if I eg serach "Calculator" I get "Add Widget: Calculator" and "Windowed Widget: Calculator" but if we merge the two with action button it will be inconsistent if an applet does *not* offer standalone mode :/

Todo:

  • The script is hardcoded in the c++ file and then sent on dbus, dunno, could be saved to a different file but I wanted to save me the trouble with cmake and qstandardpaths.
  • It does not check whether widgets are locked (how can I do that?) because then it would just do nothing
  • The priority/relevance level might need tweaking

Video: https://www.youtube.com/watch?v=p9sLzX-SCE0

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 5516.Jul 27 2016, 8:36 AM
broulik retitled this revision from to RFC: "Add Widget" runner.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, Plasma: Design.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptJul 27 2016, 8:36 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik edited the test plan for this revision. (Show Details)Jul 27 2016, 8:36 AM
mart added a subscriber: mart.Jul 27 2016, 8:46 AM

i am fine with it, not sure about being enabled by default

sebas added a subscriber: sebas.Jul 28 2016, 10:34 AM
sebas added inline comments.
runners/addwidgets/addwidgetsrunner.cpp
126

Have you tested if this works on Wayland? (It probably won't, which means the widget ends up top-left (my guess).)

broulik abandoned this revision.Apr 24 2018, 3:05 PM