Added a hopeful quit blocking dialog.

This commit is contained in:
Greyson Parrelli
2026-08-25 16:24:00 -04:00
parent 3721ec38ba
commit 198258c181
4 changed files with 292 additions and 2 deletions
+32
View File
@@ -440,6 +440,33 @@ GPU. Here, each frame walks the visible rows, groups cells into runs of
identical style, and hands each run to Pango. That is far more work per frame
in principle, but a terminal grid is small.
## Quitting
Closing the window asks first, and does so by default. A window here is not one
shell but a whole arrangement of them, and under a tiling compositor the binding
that closes it sits a modifier away from the ones that move focus — so there is
otherwise nothing between a mistyped chord and every shell in every tab exiting.
The dialog names how many tabs are about to go, which is also the quickest way
to notice you are about to close the wrong window.
**Keep Working** is the default response, and Escape lands on it too: the guard
should not itself be a keystroke to fumble. Pressing the compositor's close
binding again while the question is up dismisses it, which counts as cancelling
— leaning on the key never costs the window.
Two closes don't ask, because both are already an answer: accepting the dialog,
and closing the last tab, which is a decision to close the window made one tab
at a time.
**Settings → Quitting** turns the confirmation off, which puts the window back
to closing the moment the window manager says so:
```json
{
"confirm_quit": false
}
```
## What works
- Your login shell (from the passwd database, not `$SHELL`) on a real PTY,
@@ -497,6 +524,10 @@ in principle, but a terminal grid is small.
to the pane in that direction, `Alt+Shift+J/K` steps through tabs. Every chord
in the app can be rebound in `settings.json`. See
[Rebinding a shortcut](#rebinding-a-shortcut)
- **A confirmation before the window closes**, on by default, naming how many
tabs would go with it — so a window-manager close binding can't end a session
by accident. Switchable from **Settings → Quitting**. See
[Quitting](#quitting)
- **Light and dark schemes**, following the desktop by default and pinnable
from the settings page, applying to open tabs immediately — terminal palette
included. See [Theme](#theme)
@@ -1009,6 +1040,7 @@ The preference lives in `~/.config/playpen/settings.json` (or
{
"version": 1,
"theme": "system",
"confirm_quit": true,
"colors": {},
"startup": []
}