aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/Mood.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 19:50:40 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 19:50:40 +0200
commit923c0563f0389c4011c99b93a3edcfb09f5f3309 (patch)
tree47a82512016b4d97ac48e81c74182d8d1defd0c3 /desktop/companion/Mood.js
parent540aa76b6088025dfca284a731002cec6b6c607c (diff)
downloadquickshell-923c0563f0389c4011c99b93a3edcfb09f5f3309.tar.gz
quickshell-923c0563f0389c4011c99b93a3edcfb09f5f3309.zip
companion: sing when the Sony headphones connect
She now reacts to the headphones connecting with a short singing pose: eyes shut, blindfold gone, mouth wide open, headphones on, a few musical notes. The frames are new klein edits in frames.txt (dress/sing from dress/base, leotard/sing from dress/sing), so a post-self-destruct sing has its own art. Detection is the island's rule (StatusPill.qml): by model prefix, since BlueZ gives no class that says "headphones". The device's BlueZ Name is WH-CH720N, which the alias does not affect. The reaction is a one-shot hold in Mood.js (singHold, 4 s), placed after wave like the other event reactions. A 4 s startup grace keeps a shell start with the headphones already on from counting as a connection, since Bluetooth reads empty for about 2 s.
Diffstat (limited to 'desktop/companion/Mood.js')
-rw-r--r--desktop/companion/Mood.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/companion/Mood.js b/desktop/companion/Mood.js
index e7aaea1..2f66873 100644
--- a/desktop/companion/Mood.js
+++ b/desktop/companion/Mood.js
@@ -23,6 +23,7 @@ var T = {
mockCooldown: 20000,
typingHold: 2000,
waveHold: 3000,
+ singHold: 4000, // her singing reaction to the headphones connecting
wakeHold: 1500, // the stretch after idling
lineCooldown: 30000,
monologueCooldown: 3600000,
@@ -67,6 +68,7 @@ function pick(s) {
if (s.recording) return st("listen", "listen");
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.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)