commit 4564109ada4d5e5f971bb3d173252ecc5a70ecff (HEAD -> master) Author: Elliot Wolk <elliot.wolk@gmail.com> Date: Fri, 31 Jan 2020 15:28:14 -0500 lipstick: write window title to /tmp/lipstick-window-title every time topmost window changes diff --git a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml index e6d4f1b..1c7c4d4 100644 --- a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml +++ b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml @@ -294,10 +294,26 @@ SilicaFlickable { return count } + function writeFileOverHTTP(file, text) { + var request = new XMLHttpRequest(); + request.open("PUT", "file://" + file, false); + request.send(text); + return request.status; + } + Connections { target: Lipstick.compositor onMinimizeLaunchingWindows: switcherRoot.minimizeLaunchingWindows() - onTopmostWindowIdChanged: touchWindow(Lipstick.compositor.topmostWindowId) + onTopmostWindowIdChanged: { + var windowId = Lipstick.compositor.topmostWindowId + if(windowId > 0){ + var window = Lipstick.compositor.windowForId(windowId) + if(window){ + writeFileOverHTTP("/tmp/lipstick-window-title", window.title + "\n") + } + } + touchWindow(windowId) + } } function resetPosition(delay) {