aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/Island.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-13 10:26:59 +0200
committerDanilo M. <danix@danix.xyz>2026-10-13 10:27:04 +0200
commitd518e5f691fea8c28978bd4ea7d33c4cbda3232f (patch)
tree896b58b7a79c3d0ff6b0b80ceb541dac062bce10 /desktop/island/Island.qml
parent47a97f0717fc54b5eb33c266d8dbafdc8d3c15ee (diff)
downloadquickshell-d518e5f691fea8c28978bd4ea7d33c4cbda3232f.tar.gz
quickshell-d518e5f691fea8c28978bd4ea7d33c4cbda3232f.zip
feat(island): the clock pill opens the calendar panel
A click on the pill opens the panel in its capsule, 620px wide, growing left from the gap so the status pill does not move. Focus goes into the panel so its text fields and Escape work; Escape closes the editor before the panel. The Escape hook is back(), not escape(): QML rejects a method named escape with "Illegal method name", since it shadows the global JS function, and the reload failed until it was renamed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/island/Island.qml')
-rw-r--r--desktop/island/Island.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/desktop/island/Island.qml b/desktop/island/Island.qml
index 43422dc..61701d8 100644
--- a/desktop/island/Island.qml
+++ b/desktop/island/Island.qml
@@ -36,7 +36,7 @@ PanelWindow {
WlrLayershell.namespace: "quickshell-island"
WlrLayershell.keyboardFocus: panel !== "" ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
- // "", "sound" or "controls".
+ // "", "sound", "controls" or "calendar".
property string panel: ""
// --- reveal and hide -------------------------------------------------
@@ -57,7 +57,8 @@ PanelWindow {
else if (panel === "" && !menuHeld) hideTimer.restart();
}
onPanelChanged: {
- if (panel !== "") keys.forceActiveFocus();
+ if (panel === "calendar") clock.focusPanel();
+ else if (panel !== "") keys.forceActiveFocus();
else if (!hovered) hideTimer.restart();
}
@@ -140,7 +141,7 @@ PanelWindow {
// Key events reach a focused item, not the window (AGENTS.md).
Item {
id: keys
- Keys.onEscapePressed: win.panel = ""
+ Keys.onEscapePressed: if (!(win.panel === "calendar" && clock.back())) win.panel = ""
}
// --- geometry --------------------------------------------------------
@@ -202,6 +203,9 @@ PanelWindow {
flicking: win.flicking
flickWs: win.flickWs
flickApp: win.flickApp
+ panel: win.panel
+ onOpenCalendar: win.panel = win.panel === "calendar" ? "" : "calendar"
+ onCloseCalendar: win.panel = ""
}
StatusPill {