Add --help, terminal scrollback + scrollbar, run-dialog fix, client-safe exit, true rounded corners

- -h/--help prints a full usage overview (modes, config keys, keys, mouse)
- Run dialog now executes the typed command directly in the new window
  (previously it spawned the default shell and typed the command into
  it, which showed up as just an empty terminal)
- Virtual terminals get vt100 scrollback (config scrollback_lines,
  default 1000): mouse wheel scrolls history when the app doesn't
  capture the mouse, arrow-key fallback on the alternate screen, any
  keypress jumps back to the bottom; optional scrollbar on the right
  border (show_scrollbar) plus configurable default_window_size
- Exit triggered from a connected display client (ctrl+q / panel
  button) now only disconnects that client — the daemon/standalone
  session and its programs keep running
- Windows now paint the border zone in the desktop background color so
  rounded corners actually look rounded instead of a filled square
  with an inner rounded frame; popup dialogs rounded too
- Integration suite extended to 19 checks (scrollback, run dialog,
  client-safe exit) — all passing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 18:58:45 +02:00
parent 9cebeae716
commit db18c42481
7 changed files with 275 additions and 32 deletions

View File

@@ -75,6 +75,17 @@ TUI-WM/
## Konfiguration
Toppnivå-nycklar i `config.toml`:
| Nyckel | Default | Beskrivning |
|---|---|---|
| `default_shell` | `$SHELL` | Skal för nya terminaler |
| `default_window_size` | `[82, 26]` | `[bredd, höjd]` för nya terminalfönster |
| `scrollback_lines` | `1000` | Historikrader per virtuell terminal |
| `show_scrollbar` | `true` | Scrollbar på terminalfönstrens högerkant |
| `background_image` | | Bakgrundsbild via Kitty graphics |
| `terminal_bg_color` | genomskinlig | Terminalfönstrens bakgrundsfärg |
Konfigurationen delas upp i två nivåer:
1. **`config.toml`** — huvud-konfigfil, definierar paneler och keybinds
@@ -206,7 +217,7 @@ Exempelnycklar: `a``z`, `0``9`, `space`, `enter`, `esc`, `tab`, `backspace
| Vänsterklick på `[x]` | Stänger fönstret |
| Vänsterklick på kant/hörn | Börjar storleksändra fönstret |
| Klick i innehållsyta | Fokuserar fönstret och skickar musklick till appen i terminalen |
| Scroll inuti terminal | Skickar scroll-event till appen (med ANSI mus-protokoll) eller pilar som fallback |
| Scroll inuti terminal | Vidarebefordras till appen om den fångar musen; annars scrollas terminalens egen historik (`scrollback_lines`, scrollbar på högerkanten). På alternativskärm utan mus-stöd skickas pilar |
| Höger/mitten-klick i terminal | Vidarebefordras direkt till appen |
Möss-tracking fungerar automatiskt — om appen i terminalen aktiverar ANSI mus-protokoll (t.ex. vim, htop, ncurses-appar) vidarebefordras alla mus-events korrekt med rätt encoding (SGR, UTF-8 eller default X10).
@@ -215,6 +226,8 @@ Möss-tracking fungerar automatiskt — om appen i terminalen aktiverar ANSI mus
## Startlägen
Kör `tui-wm --help` för en komplett flagg- och tangentöversikt.
TUI-WM kan startas i tre lägen:
### Standalone (standard)
@@ -233,6 +246,8 @@ tui-wm -d
Kör headless — ingen lokal terminal-rendering. State hanteras enbart via socketen. Frames renderas internt och skickas till anslutna display-klienter. Passar för att köra TUI-WM som bakgrundstjänst.
Daemonen stängs INTE av att en klient kopplar ner eller trycker `ctrl+q` — det kopplar bara ner den klienten. Stoppa daemonen med `pkill tui-wm` eller via systemd.
### Klient (`-c`)
```bash