island: card on one monitor, live bars only on the focused one

- the card opens on the monitor that was clicked (keybinds: the focused
  monitor); the others keep their pill. moving the card to another monitor
  restarts its open animation there
- only the focused monitor's window (and the one with the card) reads
  Spectrum, so the other pills show still bars and rest
- hover lights only the pill under the pointer
- measured with music on 3 monitors: pill 10.7% of a core (was 27.5%),
  open card 20.7% (was 58%), ~62 frames a second in total, 0-1 slow
  frames per open/close (was 7-14), back to one island's cost
This commit is contained in:
server2
2026-10-08 01:25:33 +02:00
parent 967ff37b78
commit 7844a98828
4 changed files with 85 additions and 22 deletions
+2 -2
View File
@@ -10,6 +10,6 @@ fn main() {
// the card's glow follows the cover art, which art::Art copies to this one path
Palette::write().open(&art::palette_file(), 8);
// one island on every monitor, all showing the same player and state
App::new().font("Fira Code").ipc("island", island::command).window_per_monitor(|_| island::view()).run();
// one island on every monitor; the card opens only on one of them
App::new().font("Fira Code").ipc("island", island::command).window_per_monitor(island::view).run();
}