summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-23 20:51:00 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-23 20:51:00 +1000
commita8151fc89d9a7977e5fa5dd3dfbed17c8f6101a1 (patch)
tree0f356a3bcf25705446376a10b70ad9aa19017c1b
parentlock: add fprint support (#429) (diff)
downloadcaelestia-shell-a8151fc89d9a7977e5fa5dd3dfbed17c8f6101a1.tar.gz
caelestia-shell-a8151fc89d9a7977e5fa5dd3dfbed17c8f6101a1.tar.bz2
caelestia-shell-a8151fc89d9a7977e5fa5dd3dfbed17c8f6101a1.zip
hyprland: fix active client on empty ws
Closes #465
-rw-r--r--services/Hyprland.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/Hyprland.qml b/services/Hyprland.qml
index d911710..0f31453 100644
--- a/services/Hyprland.qml
+++ b/services/Hyprland.qml
@@ -11,9 +11,16 @@ Singleton {
readonly property var toplevels: Hyprland.toplevels
readonly property var workspaces: Hyprland.workspaces
readonly property var monitors: Hyprland.monitors
- readonly property HyprlandToplevel activeToplevel: Hyprland.activeToplevel
+
+ readonly property HyprlandToplevel activeToplevel: {
+ const t = Hyprland.activeToplevel;
+ if (t?.workspace?.focused || t?.workspace?.name.startsWith("special:"))
+ return t;
+ return null;
+ }
readonly property HyprlandWorkspace focusedWorkspace: Hyprland.focusedWorkspace
readonly property HyprlandMonitor focusedMonitor: Hyprland.focusedMonitor
+
readonly property int activeWsId: focusedWorkspace?.id ?? 1
readonly property string kbLayout: kbLayoutFull.slice(0, 2).toLowerCase()
property string kbLayoutFull: "?"