diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 20:15:41 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 20:15:41 +0200 |
| commit | 17680b87de53605a53805a7326f2c1f4f92cc99a (patch) | |
| tree | 959c37773c7d7e586730c7474eb35bd4a0763128 /desktop/companion/Mood.js | |
| parent | 5685d83e350138d4704cb74becadb7e579941674 (diff) | |
| download | quickshell-17680b87de53605a53805a7326f2c1f4f92cc99a.tar.gz quickshell-17680b87de53605a53805a7326f2c1f4f92cc99a.zip | |
companion: dj and groove states in Mood
A DJ burst ranks just below the headphones sing, so both arriving together
sings first. Music turns only the first idle stage into a groove: yawning
and lying down still win, so music does not keep her awake and the
screensaver handoff is unchanged. The groove pick is an input, keeping
pick() pure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/Mood.js')
| -rw-r--r-- | desktop/companion/Mood.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/companion/Mood.js b/desktop/companion/Mood.js index 2f66873..b59c1ab 100644 --- a/desktop/companion/Mood.js +++ b/desktop/companion/Mood.js @@ -24,6 +24,7 @@ var T = { typingHold: 2000, waveHold: 3000, singHold: 4000, // her singing reaction to the headphones connecting + djHold: 6000, // behind the decks when a track starts or changes wakeHold: 1500, // the stretch after idling lineCooldown: 30000, monologueCooldown: 3600000, @@ -69,6 +70,7 @@ function pick(s) { if (s.busy) return st("think", "think"); if (s.now - s.repliedAt < T.waveHold) return st("wave", "wave"); if (s.now - s.singAt < T.singHold) return st("sing", "sing"); + if (s.now - s.djAt < T.djHold) return st("dj", "dj"); if (s.clicks.count > 0 && s.now - s.clicks.at < T.clickHold) return st("clicks", clickFrame(s.clicks.count)); if (s.now - s.admireAt < T.admireLook + T.admireBlush) @@ -80,7 +82,9 @@ function pick(s) { if (s.monologue) return st("muse", "muse"); if (s.idle >= 3) return st("lying", "lying"); if (s.idle === 2) return st("yawn", "yawn"); - if (s.idle === 1) return st("bored", "sleepy"); + // Music turns boredom into a groove picked by Companion.qml; the + // deeper idle stages still win, so music does not keep her awake. + if (s.idle === 1) return s.music ? st("groove", s.groove || "whistle") : st("bored", "sleepy"); return st("base", "base"); } |
