Rename Kill to Close, add New Terminal palette entry, clean up exited terminals

- Palette's per-child "Kill <name>" action is now labelled "Close <name>"
  (action kind unchanged; still SIGTERM). Matches the existing "Close
  agent: …" context entry and reads less violent for a graceful term.
- New "New Terminal" palette entry spawns a bare interactive $SHELL pane
  via LaunchTerminal (kind=terminal). Replaces the default "shell"
  process preset that was seeded on first run.
- Exited KindTerminal entries are now dropped from the session in
  reapChild — terminals have no restart path, so leaving them behind as
  greyed rows in the Processes sidebar was just clutter. processList
  also filters defensively.
This commit was merged in pull request #2.
This commit is contained in:
2026-05-15 01:07:57 +01:00
parent 24696305d6
commit 01fc108086
7 changed files with 75 additions and 33 deletions

View File

@@ -300,14 +300,6 @@ func ensureDefaults(base string) error {
"^\\s*>_"
]
}
`,
},
{
"presets/processes/shell.json",
`{
"name": "shell",
"argv": ["__SHELL__"]
}
`,
},
}
@@ -319,15 +311,7 @@ func ensureDefaults(base string) error {
if err := os.MkdirAll(filepath.Dir(full), 0o700); err != nil {
return err
}
body := d.body
if strings.Contains(body, "__SHELL__") {
shell := os.Getenv("SHELL")
if shell == "" {
shell = "/bin/sh"
}
body = strings.ReplaceAll(body, "__SHELL__", shell)
}
if err := os.WriteFile(full, []byte(body), 0o600); err != nil {
if err := os.WriteFile(full, []byte(d.body), 0o600); err != nil {
return err
}
}