core/gtk: allow editing Ghostty config in a Ghostty window

This PR extends the `open_config` keybind action to allow editing the
Ghostty config in a new Ghostty window using the editor configured in
`$EDITOR` or `$VISUAL`.
This commit is contained in:
Jeffrey C. Ollie
2026-03-27 17:30:51 -05:00
parent 7e463bc65d
commit 0a183c923b
45 changed files with 4172 additions and 3423 deletions

View File

@@ -689,6 +689,14 @@ typedef struct {
const char* pwd;
} ghostty_action_pwd_s;
// apprt.action.OpenConfig
typedef enum {
// Open the config in the OS default editor.
GHOSTTY_ACTION_OPEN_CONFIG_OS_OPEN,
// Open the config in a new window using $EDITOR or $VISUAL
GHOSTTY_ACTION_OPEN_CONFIG_NEW_WINDOW,
} ghostty_action_open_config_e;
// terminal.MouseShape
typedef enum {
GHOSTTY_MOUSE_SHAPE_DEFAULT,
@@ -1004,6 +1012,7 @@ typedef union {
ghostty_action_search_total_s search_total;
ghostty_action_search_selected_s search_selected;
ghostty_action_readonly_e readonly;
ghostty_action_open_config_e open_config;
} ghostty_action_u;
typedef struct {