From 923c0563f0389c4011c99b93a3edcfb09f5f3309 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 23 Oct 2026 19:50:40 +0200 Subject: 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. --- desktop/companion/Mood.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop/companion/Mood.js') 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) -- cgit v1.2.3