Bug 416513 - Ability to run custom command/script on screen edge
Summary: Ability to run custom command/script on screen edge
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinscreenedges (show other bugs)
Version: 5.17.5
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-20 23:44 UTC by Dashon
Modified: 2020-01-21 20:24 UTC (History)
3 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 Dashon 2020-01-20 23:44:00 UTC
SUMMARY
Allow users to run custom command or script as an action when dragging from touch screen edge. Adding this as an extra option would allow most users to configure the rest without too much technical work. Such as compiling the dead touchegg project from source or what not. I also believe it would be easier on you guys and gals since a lot of the work is done by the user. Thanks for all the hard work.

STEPS TO REPRODUCE
1. Go to system settings
2. Click Workspace Behavior
3. Click Touch Screen
4. Click any available screen edge


OBSERVED RESULT
Few default actions that do most of what a user might need.

EXPECTED RESULT
A custom action that runs a script or command chosen by the user.

Example: Choose bottom screen edge. Custom action = onboard. Onscreen keyboard pops up. Alternatively we could use qdbus to activate the application dashboard instead of the launcher when in tablet mode. Etc., etc.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 31 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
Comment 1 David Edmundson 2020-01-21 17:53:17 UTC
This is currently do-able.

Create a kwin script. Register for a screen edge. 
From here you can do whatever, you can probably perform your action directly, or super worst case you emit a DBus call to launch your script.

Requires some nerdy steps, but this is a super nerdy feature that I don't think it's worth convoluting the UI for.
Comment 2 Dashon 2020-01-21 19:40:37 UTC
(In reply to David Edmundson from comment #1)
> This is currently do-able.
> 
> Create a kwin script. Register for a screen edge. 
> From here you can do whatever, you can probably perform your action
> directly, or super worst case you emit a DBus call to launch your script.
> 
> Requires some nerdy steps, but this is a super nerdy feature that I don't
> think it's worth convoluting the UI for.

Thanks for the info is there a resource you can point me at for creating a kwin script and registering for a screen edge. Google just tells me to download one. I'm glad that this is doable tho. I can better use my touchscreen under kde now. If worst comes to worst I can try to reverse engineer a kwin script from the internet.
Comment 3 David Edmundson 2020-01-21 20:24:53 UTC
The minimizeall script has an example of handling a screen edge

It even magically adds itself to the relevant KCM UI.