aboutsummaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 16:29:37 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 16:29:37 +0200
commit653efaf05d88252e68790a9bec3bc956b3faca21 (patch)
treeffd085fc99a0d92ff1fc1ba68cf3a8c442b86ec5 /desktop
parentf6d0f18f29bcaa77aae0b0e3d25f768937bec35b (diff)
downloadquickshell-653efaf05d88252e68790a9bec3bc956b3faca21.tar.gz
quickshell-653efaf05d88252e68790a9bec3bc956b3faca21.zip
companion: blushes at a listed wallpaper on an empty workspace
Checked on switching workspace or closing a window, and whenever she stops being away, which covers being shown, a remap, a hop to another monitor, a dodge and fullscreen. The 3 minute cooldown keeps workspace flicking from repeating it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/companion/Companion.qml28
-rw-r--r--desktop/companion/Lines.js1
2 files changed, 27 insertions, 2 deletions
diff --git a/desktop/companion/Companion.qml b/desktop/companion/Companion.qml
index 683eb4a..51dfea9 100644
--- a/desktop/companion/Companion.qml
+++ b/desktop/companion/Companion.qml
@@ -82,6 +82,7 @@ PanelWindow {
property double typingAt: 0
property double pulseAt: 0
property double wakeAt: 0
+ property double admireAt: 0
property double lastLineAt: 0
property double lastMonologueAt: 0
property bool monologue: false
@@ -171,9 +172,10 @@ PanelWindow {
const cls = event.data.split(",")[0].trim().toLowerCase();
if (cls !== "" && cls !== root.appClass && Math.random() < 1 / 3) root.say("app:" + cls);
root.appClass = cls;
- } else if (["fullscreen", "activewindowv2", "workspacev2"].includes(event.name)) {
+ } else if (["fullscreen", "activewindowv2", "workspacev2", "closewindow"].includes(event.name)) {
Hyprland.refreshToplevels();
fsSettle.restart();
+ admireSettle.restart();
}
}
}
@@ -186,6 +188,28 @@ PanelWindow {
}
}
+ // A listed wallpaper on an empty workspace: she turns to it and blushes.
+ // Checked after the events above (switching to an empty workspace,
+ // closing its last window) and whenever she stops being away: shown,
+ // back from a remap, a hop, a dodge or fullscreen. Toplevels settle a
+ // moment after the event, as fullscreen does.
+ onAwayChanged: if (!root.away) admireSettle.restart()
+ Timer {
+ id: admireSettle
+ interval: 100
+ onTriggered: {
+ const t = Date.now();
+ if (root.away || root.here !== root.focused || !Mood.admireAllowed(root.admireAt, t)) return;
+ if ((Hyprland.focusedWorkspace?.toplevels.values.length ?? 1) !== 0) return;
+ if (!Admired.listed(Admired.on(root.here))) return;
+ root.admireAt = t;
+ root.now = t;
+ admireLine.restart();
+ }
+ }
+ // The line comes with the blush, not the turn.
+ Timer { id: admireLine; interval: Mood.T.admireLook; onTriggered: root.say("wallpaper") }
+
// Hyprland stacks a later surface above an earlier one on the same layer
// and 0.56.2 has no layer rule to order them, so the assistant canvas's
// full-screen dim covered her and her think and wave were never seen.
@@ -217,7 +241,7 @@ PanelWindow {
now: root.now, destructAt: root.destructAt, dodging: root.dodging, shoved: root.shoved,
shovedAt: root.shovedAt,
recording: root.asst.recording, busy: root.asst.busy, repliedAt: root.repliedAt,
- clicks: root.clicks, mockAt: root.mockAt, typingAt: root.typingAt, wakeAt: root.wakeAt,
+ clicks: root.clicks, admireAt: root.admireAt, mockAt: root.mockAt, typingAt: root.typingAt, wakeAt: root.wakeAt,
monologue: root.monologue, idle: root.idle,
})
readonly property string outfit: Mood.outfit(root.destructAt, root.now)
diff --git a/desktop/companion/Lines.js b/desktop/companion/Lines.js
index 12b54d6..d6450df 100644
--- a/desktop/companion/Lines.js
+++ b/desktop/companion/Lines.js
@@ -24,6 +24,7 @@ var lines = {
ready: ["Answer's ready.", "Your reply came in."],
click: ["...Yes?", "Can I help you?"],
blush: ["S-stop that.", "...Operator."],
+ wallpaper: ["...!", "W-what is this?", "I wasn't staring."],
dodge: ["...Fine.", "I'll move."],
destruct: ["Self-destruct sequence initiated."],
aftermath: ["...That was unpleasant."],