spi refactor
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
||||
Variants {
|
||||
id: root
|
||||
|
||||
// Automatically generates a trap for every connected monitor
|
||||
model: Quickshell.screens
|
||||
|
||||
delegate: PanelWindow {
|
||||
screen: modelData
|
||||
|
||||
// Force the panel window to take up the full screen real estate
|
||||
anchors.top: true
|
||||
anchors.bottom: true
|
||||
anchors.left: true
|
||||
anchors.right: true
|
||||
|
||||
// Push it to the background layer below normal windows
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
WlrLayershell.namespace: "transparent-focus-trap"
|
||||
|
||||
// Keep it transparent so your current wallpaper shows right through
|
||||
color: "transparent"
|
||||
|
||||
// The core trap mechanism
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
// Having an active hover area on the background layer forces the
|
||||
// Wayland compositor to shift cursor target focus to this surface
|
||||
// the exact millisecond your mouse exits a tiled/floating window.
|
||||
onEntered: {
|
||||
console.log("DEBUG: Mouse entered background (Focus Trap Active)");
|
||||
}
|
||||
|
||||
onExited: {
|
||||
console.log("DEBUG: Mouse left background (Focusing on Window)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ Item {
|
||||
const title = Hyprland.activeToplevel?.title;
|
||||
if (!title)
|
||||
return qsTr("Desktop");
|
||||
return title.split(/\s+[\-\u2013\u2014\|]\s+/).pop();
|
||||
return title.split(/\s+[\-\u2013\u2014\|]\s+/).pop();q
|
||||
}
|
||||
|
||||
readonly property string appIcon: {
|
||||
@@ -29,10 +29,6 @@ Item {
|
||||
|
||||
let icon = AppsState.matchIcon(root.windowClass);
|
||||
|
||||
if (!icon) {
|
||||
icon = AppsState.matchIcon(root.windowClass.toLowerCase());
|
||||
}
|
||||
|
||||
if (!icon) {
|
||||
icon = AppsState.matchIcon(root.windowTitle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user