A tui/cli program for tweaking niri wm display outputs dynamically without modifying configurations.

[ADD] tui: the state and the keys master

The state of the interface holds no terminal and no connection. Every operation is a pure function, and an operation that needs the compositor gives an effect to the caller. The tests therefore examine the full behavior of the interface with no terminal and no niri. A key maps to an operation, and an operation changes the state. The step of a movement must be larger than the limit of a snap operation. A key press moves an output 48 pixels, and a snap operation moves an output not more than 32 pixels. A limit above the step pulls the output back to the position that it left, and the output never moves. A constant assertion holds this relation. The state also keeps the position that the movements give, apart from the position that a snap operation gives. Without that record the movements of separate key presses do not accumulate, because each press starts again from a position that a snap operation moved. A movement of one pixel uses no snap operation and starts from the position on the screen, so an exact position stays exact. The state refuses to turn off the last output.


+1389
6 changed files