INTERZONE_MOTION=off keeps the logo and bars still

For slow links, and for shots.sh: a screen that moves by itself made its
press think every key had landed at once, and screenshots shouldn't depend
on the moment they're taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vvvomitandClaude Opus 5.5 committed 2026-10-29 18:23:57 +03:30
1 parent be256f1f13
commit 00a0d239e3
4 files changed
+12 -4

No files matched your search

+1
View File
@@ -399,6 +399,7 @@ link preview from them.
./interzone -no-mouse # leave the mouse to the terminal
./interzone -layout compact # phone layout, whatever the size (or wide, or auto)
./interzone -theme nord # colours for one run (ctrl+y switches and remembers them)
INTERZONE_MOTION=off ./interzone # keep the logo and progress bars still
./interzone -plain # no colours, ASCII boxes and bars, no animation: for screen
# readers and logs (or INTERZONE_PLAIN=1)
```
+5 -3
View File
@@ -2,6 +2,7 @@ package ui
import (
"math"
"os"
"strings"
"time"
@@ -14,8 +15,9 @@ import (
//
// A few things move: Welcome's logo flows through the theme's colours and
// the deploy bar shimmers while it runs. Frames tick only while the screen
// showing asks for them, and never in plain mode. Frame 0 is the still
// picture, which the layout tests draw.
// showing asks for them, and never in plain mode or with
// INTERZONE_MOTION=off (for slow links, and screenshots that don't depend on
// the moment). Frame 0 is the still picture, which the layout tests draw.
var animFrame int
@@ -30,7 +32,7 @@ type animator interface{ animating() bool }
// is on its way already.
func (a *App) animate() tea.Cmd {
an, ok := a.cur().(animator)
if a.animOn || plain || !ok || !an.animating() {
if a.animOn || plain || !ok || !an.animating() || os.Getenv("INTERZONE_MOTION") == "off" {
return nil
}
a.animOn = true
+5
View File
@@ -18,6 +18,11 @@ func TestAnimTicksOnlyWhereSomethingMoves(t *testing.T) {
t.Error("a second tick while one is on its way")
}
a.animOn = false
t.Setenv("INTERZONE_MOTION", "off")
if a.animate() != nil {
t.Error("INTERZONE_MOTION=off still ticks")
}
t.Setenv("INTERZONE_MOTION", "")
a.step = a.index("Manage")
if a.animate() != nil {
t.Error("Manage doesn't move, yet it ticks")
+1 -1
View File
@@ -54,7 +54,7 @@ start() {
JSON
tmux kill-session -t shot 2>/dev/null || true
tmux new-session -d -s shot -x "${size%x*}" -y "${size#*x}" -c "$work" \
"env -u XDG_CONFIG_HOME XDG_CONFIG_HOME=rel XDG_DATA_HOME='~/.local/share' INTERZONE_HEALTH=off COLORTERM=truecolor ./iz 2>iz.err"
"env -u XDG_CONFIG_HOME XDG_CONFIG_HOME=rel XDG_DATA_HOME='~/.local/share' INTERZONE_HEALTH=off INTERZONE_MOTION=off COLORTERM=truecolor ./iz 2>iz.err"
echo "running in tmux session shot ($size); attach with: tmux attach -t shot"
}