Bug 391575 - [Application Launcher Hot Spot Edge] - isnt triggering for Latte Dock
Summary: [Application Launcher Hot Spot Edge] - isnt triggering for Latte Dock
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-08 18:25 UTC by Michail Vourlakos
Modified: 2018-03-10 12:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-18287-0.html (2.33 KB, text/html)
2018-03-08 21:22 UTC, Michail Vourlakos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michail Vourlakos 2018-03-08 18:25:39 UTC
I dont know if this is valid.

For Latte to support the Meta call to show the Application Launcher we use:
https://github.com/psifidotos/Latte-Dock/wiki/F.A.Q.#q-can-i-use-my-super-key-to-open-the-app-launcher

but this isnt enough for KWin Screen Edges behavior in order to support it also.

Is this possible?
Do we need to adjust something more in Latte codepage?

regards,
michail
Comment 1 Martin Flöser 2018-03-08 21:04:33 UTC
The application launcher in screenedge is hardcoded to:

            QDBusMessage::createMethodCall(QStringLiteral("org.kde.plasmashell"),
                                           QStringLiteral("/PlasmaShell"),
                                           QStringLiteral("org.kde.PlasmaShell"),
                                           QStringLiteral("activateLauncherMenu")

This is btw. the same command as for the modifier only shortcut in default.
If Latte is the one and only application launcher in a Plasma session, Plasmashell should open it when invoking activateLauncherMenu.

Reassigning to latte
Comment 2 Michail Vourlakos 2018-03-08 21:22:33 UTC
Created attachment 111269 [details]
attachment-18287-0.html

Martin Latte Dock is an external application and lives outside of
plasmashell, if this is hardcoded then I dont think it can be done anything
else. Except if the script can share somehow the Meta code.


Στις 8 Μαρ 2018 11:04 μ.μ., ο χρήστης "Martin Flöser" <
bugzilla_noreply@kde.org> έγραψε:

> https://bugs.kde.org/show_bug.cgi?id=391575
>
> Martin Flöser <mgraesslin@kde.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>           Component|general                     |containment
>             Version|5.12.2                      |git (master)
>            Assignee|kwin-bugs-null@kde.org      |mvourlakos@gmail.com
>             Product|kwin                        |lattedock
>
> --- Comment #1 from Martin Flöser <mgraesslin@kde.org> ---
> The application launcher in screenedge is hardcoded to:
>
>
> QDBusMessage::createMethodCall(QStringLiteral("org.kde.plasmashell"),
>                                            QStringLiteral("/PlasmaShell"),
>
> QStringLiteral("org.kde.PlasmaShell"),
>
> QStringLiteral("activateLauncherMenu")
>
> This is btw. the same command as for the modifier only shortcut in default.
> If Latte is the one and only application launcher in a Plasma session,
> Plasmashell should open it when invoking activateLauncherMenu.
>
> Reassigning to latte
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are the assignee for the bug.
Comment 3 Michail Vourlakos 2018-03-08 23:13:29 UTC
Martin I have sent this: https://phabricator.kde.org/D11164

in case we can make edges aware of user-set modifier actions
Comment 4 Martin Flöser 2018-03-09 05:20:06 UTC
You could provide a KWin script to launch latte dock.
Comment 5 Michail Vourlakos 2018-03-09 05:39:05 UTC
can kwin scripts be assigned by the user to which edge to be activated like the original kwin edge actions?
Comment 6 Michail Vourlakos 2018-03-09 08:59:47 UTC
Ok.. I will create a kwin script for this then... I just need to find out kwin scripts where to they store their settings, in order to give at least to the user the option to edit that file to set the Corner that wants the script to be executed...
Comment 7 Martin Flöser 2018-03-09 17:14:51 UTC
It just works like any other edge action... You don't need a config file for it. You can have a look at minimizeAll script which uses edge activation already.
Comment 8 Michail Vourlakos 2018-03-10 12:23:55 UTC
Martin I get an error from the following code:

file:///home/michail/.local/share/kwin/scripts/activatelattelaunchermenu/contents/ui/main.qml:48: ReferenceError: registerScreenEdge is not defined

do I miss something?

-----
import QtQuick 2.0

import org.kde.kwin 2.0
import org.kde.latte 0.1 as Latte

Item {
    id: root

    property var registeredBorders: []

    Component.onCompleted: {
        options.configChanged.connect(init);

        init();
    }

    function init() {
        for (var i in registeredBorders) {
            unregisterScreenEdge(registeredBorders[i]);
        }

        registeredBorders = [];

        var borders = KWin.readConfig("BorderActivate", "").toString().split(",");
        for (var i in borders) {
            var border = parseInt(borders[i]);
            if (isFinite(border)) {
                registeredBorders.push(border);
                registerScreenEdge(border, activateLauncherMenu);
            }
        }
    }

    function activateLauncherMenu() {
        Latte.WindowSystem.activateLatteLauncherMenu();
    }
}



-----
Comment 9 Michail Vourlakos 2018-03-10 12:44:31 UTC
so sorry Martin... 

I have just found it how to use only javascript code through callDBus function and not qml at all...