aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/Mood.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-24 12:08:49 +0200
committerDanilo M. <danix@danix.xyz>2026-10-24 12:08:49 +0200
commitadb81f6d21b8152114b62acbfc6fa78c9ecec29f (patch)
tree649ca1736f3768b44efcfec4adb0a154e94bd7f5 /desktop/companion/Mood.js
parentef75bb03861b4cab59038846fcff7f6137c639b2 (diff)
downloadquickshell-adb81f6d21b8152114b62acbfc6fa78c9ecec29f.tar.gz
quickshell-adb81f6d21b8152114b62acbfc6fa78c9ecec29f.zip
companion: seatFrame, the sitting version of a frame
Pure, so the seat's frame choice is tested with the rest of Mood rather than by eye. Frames without a sitting version fall to the plain sit: a standing frame on the card's edge would float above it. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/Mood.js')
-rw-r--r--desktop/companion/Mood.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/companion/Mood.js b/desktop/companion/Mood.js
index b59c1ab..be514d7 100644
--- a/desktop/companion/Mood.js
+++ b/desktop/companion/Mood.js
@@ -105,6 +105,15 @@ function admireAllowed(lastAt, now) { return now - lastAt >= T.admireCooldown; }
function canSpeak(lastLineAt, now) { return now - lastLineAt >= T.lineCooldown; }
+// Seated on the assistant's tall card (Companion.qml, sitting): the frames
+// with a sitting version show it, everything else the plain sit. Typing's
+// watch becomes the lean over the card, reading.
+var SEAT = {
+ watch: "sit-read", point: "sit-point", smirk: "sit-smirk", think: "sit-think",
+ listen: "sit-listen", wave: "sit-wave", "wave-l": "sit-wave", "wave-r": "sit-wave",
+};
+function seatFrame(frame) { return SEAT[frame] || "sit"; }
+
// Whether the opening monologue plays: a chance per trigger, and never
// twice within the hour. roll is Math.random(), passed in for the test.
function monologue(trigger, lastAt, now, roll) {