Files
omni-launcher/qml/HyprlandIntegration.qml
T
Radu Macocian becb1a4282 Version 0.1
2026-06-04 15:02:25 +02:00

26 lines
640 B
QML

import QtQuick
import Quickshell.Hyprland
import Quickshell.Hyprland._FocusGrab
Item {
id: root
// Set by the Loader's parent — the launcher PanelWindow. We can't access
// siblings directly, so pass it through this property.
property var window: null
property bool armed: false
HyprlandFocusGrab {
active: root.armed && root.window !== null
windows: root.window ? [root.window] : []
onCleared: LauncherService.close()
}
Connections {
target: Hyprland
function onFocusedWorkspaceChanged() {
if (root.armed) LauncherService.close();
}
}
}