very broken keybinds lol

This commit is contained in:
2026-06-30 15:55:32 +01:00
parent 7a324e6119
commit 63e360d427
6 changed files with 142 additions and 2 deletions

34
Bar.qml
View File

@@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Effects
import QtQuick.Layouts
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import Quickshell.Wayland
import "./Services/"
import "Bar"
import "Color.js" as Colors
@@ -19,6 +20,15 @@ Scope {
required property var modelData
property HyprlandMonitor monitor: Hyprland.monitorFor(modelData)
function refocus() {
if (WlrLayershell == null)
return;
WlrLayershell.keyboardFocus = WlrKeyboardFocus.None;
Qt.callLater(() => {
WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive;
});
}
color: "transparent"
exclusionMode: ExclusionMode.Normal
exclusiveZone: barExclusionZone
@@ -39,6 +49,26 @@ Scope {
}
}
Component.onCompleted: {
if (this.WlrLayershell != null) {
this.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand;
}
}
Connections {
function onRaiseCancelled() {
win.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand;
}
function onRaiseRequested() {
// win.WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive;
win.refocus();
}
target: FocusManager
}
anchors {
left: true
right: true