This demo artifact accompanies cossio/warp#1.
The PR implements the Contour dark/light theme extension:
CSI ? 996 nqueries Warp for the current dark/light classification.- Warp replies with
CSI ? 997 ; 1 nfor dark mode orCSI ? 997 ; 2 nfor light mode. CSI ? 2031 hopts a terminal app into unsolicited theme-change notifications.CSI ? 2031 lopts it back out.- Notifications are suppressed when the Warp theme changes but the dark/light classification stays the same.
The accompanying warp-gh9425-demo.cast is an asciinema v2 recording that shows the expected observable terminal I/O for the fix.
$ ./warp-gh9425-protocol-demo
Warp GH#9425 protocol demo
1. Current theme query
app -> Warp: ESC [ ? 996 n
Warp -> app: ESC [ ? 997 ; 1 n (dark)
2. Opt in for unsolicited notifications
app -> Warp: ESC [ ? 2031 h
3. User switches Warp from a dark theme to a light theme
Warp -> app: ESC [ ? 997 ; 2 n (light)
4. User switches between two light themes
Warp -> app: <none> (classification unchanged)
5. User switches back to a dark theme
Warp -> app: ESC [ ? 997 ; 1 n (dark)
6. App opts out
app -> Warp: ESC [ ? 2031 l
next theme switch: <none>