diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 15:59:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 15:59:32 +0200 |
| commit | 536332f61619026792cdd02f45469100ddd07b61 (patch) | |
| tree | fb7d185a81b7da4ee9005477d1b542b5d842f194 /desktop/companion/Lines.js | |
| parent | 1c9dfe96b2f11c20ea3c00314abe9dc694d00050 (diff) | |
| download | quickshell-536332f61619026792cdd02f45469100ddd07b61.tar.gz quickshell-536332f61619026792cdd02f45469100ddd07b61.zip | |
companion: a remark for the program in front of her
The focused window's class, from Hyprland's activewindow event, picks a
line from Lines.js keyed app:<class>. The event fires on every title
change too, so she reacts only when the class changes, and a third of
the time, under the existing 30 s line cooldown so alt-tabbing does not
make her chatter. Classes come from the window rules in the live config;
one without lines says nothing. Lines only, no frames of her own yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/Lines.js')
| -rw-r--r-- | desktop/companion/Lines.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/companion/Lines.js b/desktop/companion/Lines.js index 6f387aa..12b54d6 100644 --- a/desktop/companion/Lines.js +++ b/desktop/companion/Lines.js @@ -27,6 +27,23 @@ var lines = { dodge: ["...Fine.", "I'll move."], destruct: ["Self-destruct sequence initiated."], aftermath: ["...That was unpleasant."], + + // The focused window's class, lowercased, as "app:<class>". A class + // with no entry says nothing. + "app:firefox": ["Researching again?", "Don't open too many tabs.", "The Bunker's network is faster."], + "app:kitty": ["A terminal. Serious work.", "Careful with that rm.", "I'll watch your commands."], + "app:discord": ["Talking to the Resistance?", "Don't tell them where we are."], + "app:signal": ["Encrypted. Good."], + "app:steam": ["Training simulation?", "Don't play all night."], + "app:gimp": ["Making art?"], + "app:com.obsproject.studio": ["Are we recording?", "I'll stay out of frame."], + "app:md.obsidian.obsidian": ["Writing a report?", "Taking notes. Good habit."], + "app:sublime_text": ["Writing code?", "Mind the typos."], + "app:qtmaildir": ["Any orders from Command?", "Mail. Anything urgent?"], + "app:virt-manager": ["More machines?", "Androids running androids."], + "app:audacious": ["Music. I like this."], + "app:llamachat": ["Talking to Pod?"], + "app:qtpass": ["I'm not looking."], }; // The game's opening, one sentence per bubble. |
