diff --git a/include/ghostty.h b/include/ghostty.h index bcd88251b..0c9b840e7 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -680,6 +680,12 @@ typedef struct { uintptr_t len; } ghostty_action_open_url_s; +// apprt.surface.Message.ChildExited +typedef struct { + uint32_t exit_code; + uint64_t timetime_ms; +} ghostty_surface_message_childexited_s; + // apprt.Action.Key typedef enum { GHOSTTY_ACTION_QUIT, @@ -731,6 +737,7 @@ typedef enum { GHOSTTY_ACTION_REDO, GHOSTTY_ACTION_CHECK_FOR_UPDATES, GHOSTTY_ACTION_OPEN_URL, + GHOSTTY_ACTION_SHOW_CHILD_EXITED } ghostty_action_tag_e; typedef union { @@ -759,6 +766,7 @@ typedef union { ghostty_action_reload_config_s reload_config; ghostty_action_config_change_s config_change; ghostty_action_open_url_s open_url; + ghostty_surface_message_childexited_s child_exited; } ghostty_action_u; typedef struct { diff --git a/macos/Sources/Ghostty/Ghostty.App.swift b/macos/Sources/Ghostty/Ghostty.App.swift index 0fdea1760..c94f40291 100644 --- a/macos/Sources/Ghostty/Ghostty.App.swift +++ b/macos/Sources/Ghostty/Ghostty.App.swift @@ -579,6 +579,8 @@ extension Ghostty { case GHOSTTY_ACTION_SIZE_LIMIT: fallthrough case GHOSTTY_ACTION_QUIT_TIMER: + fallthrough + case GHOSTTY_ACTION_SHOW_CHILD_EXITED: Ghostty.logger.info("known but unimplemented action action=\(action.tag.rawValue)") return false default: diff --git a/po/bg_BG.UTF-8.po b/po/bg_BG.UTF-8.po index 84fd455e2..e92d76b38 100644 --- a/po/bg_BG.UTF-8.po +++ b/po/bg_BG.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-05-19 11:34+0300\n" "Last-Translator: Damyan Bogoev \n" "Language-Team: Bulgarian \n" @@ -236,7 +236,7 @@ msgstr "" "Поставянето на този текст в терминала може да е опасно, тъй като изглежда, " "че може да бъдат изпълнени някои команди." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Затвори" @@ -276,6 +276,14 @@ msgstr "Текущият процес в това разделяне ще бъд msgid "Copied to clipboard" msgstr "Копирано в клипборда" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Главно меню" diff --git a/po/ca_ES.UTF-8.po b/po/ca_ES.UTF-8.po index 11bc99f57..fe0cda009 100644 --- a/po/ca_ES.UTF-8.po +++ b/po/ca_ES.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-20 08:07+0100\n" "Last-Translator: Francesc Arpi \n" "Language-Team: \n" @@ -236,7 +236,7 @@ msgstr "" "Enganxar aquest text al terminal pot ser perillós, ja que sembla que es " "podrien executar algunes ordres." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Tanca" @@ -276,6 +276,14 @@ msgstr "El procés actualment en execució en aquesta divisió es tancarà." msgid "Copied to clipboard" msgstr "Copiat al porta-retalls" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menú principal" diff --git a/po/com.mitchellh.ghostty.pot b/po/com.mitchellh.ghostty.pot index 584f843b6..0c7a39cd1 100644 --- a/po/com.mitchellh.ghostty.pot +++ b/po/com.mitchellh.ghostty.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -228,7 +228,7 @@ msgid "" "commands may be executed." msgstr "" -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "" @@ -268,6 +268,14 @@ msgstr "" msgid "Copied to clipboard" msgstr "" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "" diff --git a/po/de_DE.UTF-8.po b/po/de_DE.UTF-8.po index fcca71101..2b24b68b0 100644 --- a/po/de_DE.UTF-8.po +++ b/po/de_DE.UTF-8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-06 14:57+0100\n" "Last-Translator: Robin \n" "Language-Team: German \n" @@ -235,7 +235,7 @@ msgstr "" "Diesen Text in das Terminal einzufügen könnte möglicherweise gefährlich " "sein. Es scheint, dass Anweisungen ausgeführt werden könnten." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Schließen" @@ -275,6 +275,14 @@ msgstr "Der aktuell laufende Prozess in diesem geteilten Fenster wird beendet." msgid "Copied to clipboard" msgstr "In die Zwischenablage kopiert" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Hauptmenü" diff --git a/po/es_AR.UTF-8.po b/po/es_AR.UTF-8.po index 9b3b68693..3c7e89c00 100644 --- a/po/es_AR.UTF-8.po +++ b/po/es_AR.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-05-19 20:17-0300\n" "Last-Translator: Alan Moyano \n" "Language-Team: Argentinian \n" @@ -236,7 +236,7 @@ msgstr "" "Pegar este texto en la terminal puede ser peligroso ya que parece que " "algunos comandos podrían ejecutarse." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Cerrar" @@ -276,6 +276,14 @@ msgstr "El proceso actualmente en ejecución en esta división será terminado." msgid "Copied to clipboard" msgstr "Copiado al portapapeles" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menú principal" diff --git a/po/es_BO.UTF-8.po b/po/es_BO.UTF-8.po index c89b53f61..c2b3ae270 100644 --- a/po/es_BO.UTF-8.po +++ b/po/es_BO.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-28 17:46+0200\n" "Last-Translator: Miguel Peredo \n" "Language-Team: Spanish \n" @@ -236,7 +236,7 @@ msgstr "" "Pegar este texto en la terminal puede ser peligroso ya que parece que " "algunos comandos podrían ejecutarse." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Cerrar" @@ -276,6 +276,14 @@ msgstr "El proceso actualmente en ejecución en esta división será terminado." msgid "Copied to clipboard" msgstr "Copiado al portapapeles" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menú principal" diff --git a/po/fr_FR.UTF-8.po b/po/fr_FR.UTF-8.po index 2c227edaf..b63bc044c 100644 --- a/po/fr_FR.UTF-8.po +++ b/po/fr_FR.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-22 09:31+0100\n" "Last-Translator: Kirwiisp \n" "Language-Team: French \n" @@ -237,7 +237,7 @@ msgstr "" "Coller ce texte dans le terminal pourrait être dangereux, il semblerait que " "certaines commandes pourraient être exécutées." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Fermer" @@ -277,6 +277,14 @@ msgstr "Le processus en cours dans ce panneau va être arrêté." msgid "Copied to clipboard" msgstr "Copié dans le presse-papiers" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menu principal" diff --git a/po/ga_IE.UTF-8.po b/po/ga_IE.UTF-8.po index 3c8018ca0..cc884e753 100644 --- a/po/ga_IE.UTF-8.po +++ b/po/ga_IE.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-06-29 21:15+0100\n" "Last-Translator: Aindriú Mac Giolla Eoin \n" "Language-Team: Irish \n" @@ -237,7 +237,7 @@ msgstr "" "D’fhéadfadh sé a bheith contúirteach an téacs seo a ghreamú isteach sa " "teirminéal, toisc go d'fhéadfadh roinnt orduithe a fhorghníomhú." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Dún" @@ -278,6 +278,14 @@ msgstr "" msgid "Copied to clipboard" msgstr "Cóipeáilte chuig an ghearrthaisce" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Príomh-Roghchlár" diff --git a/po/he_IL.UTF-8.po b/po/he_IL.UTF-8.po index 7ca417908..c5fd5b348 100644 --- a/po/he_IL.UTF-8.po +++ b/po/he_IL.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-13 00:00+0000\n" "Last-Translator: Sl (Shahaf Levi), Sl's Repository Ltd \n" @@ -234,7 +234,7 @@ msgstr "" "הדבקת טקסט זה במסוף עלולה להיות מסוכנת, מכיוון שככל הנראה היא תוביל להרצה של " "פקודות מסוימות." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "סגירה" @@ -274,6 +274,14 @@ msgstr "התהליך שרץ כרגע בפיצול זה יסתיים." msgid "Copied to clipboard" msgstr "הועתק ללוח ההעתקה" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "תפריט ראשי" diff --git a/po/id_ID.UTF-8.po b/po/id_ID.UTF-8.po index 51b4bce60..b6fc58c29 100644 --- a/po/id_ID.UTF-8.po +++ b/po/id_ID.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-20 15:19+0700\n" "Last-Translator: Satrio Bayu Aji \n" "Language-Team: Indonesian \n" @@ -235,7 +235,7 @@ msgstr "" "Menempelkan teks ini ke terminal mungkin berbahaya karena sepertinya " "beberapa perintah mungkin dijalankan." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Tutup" @@ -275,6 +275,14 @@ msgstr "Proses yang sedang berjalan dalam belahan ini akan diakhiri." msgid "Copied to clipboard" msgstr "Disalin ke papan klip" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menu utama" diff --git a/po/ja_JP.UTF-8.po b/po/ja_JP.UTF-8.po index c965ea29f..a3e261a83 100644 --- a/po/ja_JP.UTF-8.po +++ b/po/ja_JP.UTF-8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-21 00:08+0900\n" "Last-Translator: Lon Sagisawa \n" "Language-Team: Japanese\n" @@ -237,7 +237,7 @@ msgstr "" "このテキストには実行可能なコマンドが含まれており、ターミナルに貼り付けるのは" "危険な可能性があります。" -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "閉じる" @@ -277,6 +277,14 @@ msgstr "分割ウィンドウ内のすべてのプロセスが終了します。 msgid "Copied to clipboard" msgstr "クリップボードにコピーしました" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "メインメニュー" diff --git a/po/ko_KR.UTF-8.po b/po/ko_KR.UTF-8.po index 875e7a1a5..92c460b9b 100644 --- a/po/ko_KR.UTF-8.po +++ b/po/ko_KR.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-07-09 16:11-0400\n" "Last-Translator: Hojin You \n" "Language-Team: Korean \n" @@ -236,7 +236,7 @@ msgstr "" "이 텍스트를 터미널에 붙여넣는 것은 위험할 수 있습니다. 일부 명령이 실행될 수 " "있는 것으로 보입니다." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "닫기" @@ -276,6 +276,14 @@ msgstr "이 분할에서 현재 실행 중인 프로세스가 종료됩니다." msgid "Copied to clipboard" msgstr "클립보드에 복사됨" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "메인 메뉴" diff --git a/po/mk_MK.UTF-8.po b/po/mk_MK.UTF-8.po index 75bb81e00..8cc5bc716 100644 --- a/po/mk_MK.UTF-8.po +++ b/po/mk_MK.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-23 14:17+0100\n" "Last-Translator: Andrej Daskalov \n" "Language-Team: Macedonian\n" @@ -236,7 +236,7 @@ msgstr "" "Вметнувањето на овој текст во терминалот може да биде опасно, бидејќи " "изгледа како да ќе се извршат одредени команди." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Затвори" @@ -276,6 +276,14 @@ msgstr "Процесот кој моментално се извршува во msgid "Copied to clipboard" msgstr "Копирано во привремена меморија" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Главно мени" diff --git a/po/nb_NO.UTF-8.po b/po/nb_NO.UTF-8.po index 28c1bc559..d583b1a0e 100644 --- a/po/nb_NO.UTF-8.po +++ b/po/nb_NO.UTF-8.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-04-14 16:25+0200\n" "Last-Translator: cryptocode \n" "Language-Team: Norwegian Bokmal \n" @@ -239,7 +239,7 @@ msgstr "" "Det ser ut som at kommandoer vil bli kjørt hvis du limer inn dette, vurder " "om du mener det er trygt." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Lukk" @@ -279,6 +279,14 @@ msgstr "Den kjørende prosessen for denne splitten vil bli avsluttet." msgid "Copied to clipboard" msgstr "Kopiert til utklippstavlen" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Hovedmeny" diff --git a/po/nl_NL.UTF-8.po b/po/nl_NL.UTF-8.po index d64592f6d..c310f38ea 100644 --- a/po/nl_NL.UTF-8.po +++ b/po/nl_NL.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-24 15:00+0100\n" "Last-Translator: Nico Geesink \n" "Language-Team: Dutch \n" @@ -236,7 +236,7 @@ msgstr "" "Het plakken van deze tekst in de terminal is mogelijk gevaarlijk, omdat het " "lijkt op een commando dat uitgevoerd kan worden." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Afsluiten" @@ -277,6 +277,14 @@ msgstr "" msgid "Copied to clipboard" msgstr "Gekopieerd naar klembord" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Hoofdmenu" diff --git a/po/pl_PL.UTF-8.po b/po/pl_PL.UTF-8.po index 4f281b415..4c8a8c273 100644 --- a/po/pl_PL.UTF-8.po +++ b/po/pl_PL.UTF-8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-17 12:15+0100\n" "Last-Translator: Bartosz Sokorski \n" "Language-Team: Polish \n" @@ -238,7 +238,7 @@ msgstr "" "Wklejenie tego tekstu do terminala może być niebezpieczne, ponieważ może " "spowodować wykonanie komend." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Zamknij" @@ -278,6 +278,14 @@ msgstr "Wszyskie trwające procesy w obecnym podziale zostaną zakończone." msgid "Copied to clipboard" msgstr "Skopiowano do schowka" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Menu główne" diff --git a/po/pt_BR.UTF-8.po b/po/pt_BR.UTF-8.po index 2979248f2..76ed048a4 100644 --- a/po/pt_BR.UTF-8.po +++ b/po/pt_BR.UTF-8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-06-20 10:19-0300\n" "Last-Translator: Mário Victor Ribeiro Silva \n" "Language-Team: Brazilian Portuguese \n" "Language-Team: Russian \n" @@ -237,7 +237,7 @@ msgstr "" "Вставка этого текста в терминал может быть опасной. Это выглядит как " "команды, которые могут быть исполнены." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Закрыть" @@ -277,6 +277,14 @@ msgstr "Процесс, работающий в этой сплит-област msgid "Copied to clipboard" msgstr "Скопировано в буфер обмена" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Главное меню" diff --git a/po/tr_TR.UTF-8.po b/po/tr_TR.UTF-8.po index 7d8d055f8..251aa27ca 100644 --- a/po/tr_TR.UTF-8.po +++ b/po/tr_TR.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-24 22:01+0300\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish\n" @@ -237,7 +237,7 @@ msgstr "" "Bu metni uçbirime yapıştırmak tehlikeli olabilir; çünkü bir komut " "yürütülebilecekmiş gibi duruyor." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Kapat" @@ -277,6 +277,14 @@ msgstr "Bu bölmedeki şu anda çalışan süreç sonlandırılacaktır." msgid "Copied to clipboard" msgstr "Panoya kopyalandı" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Ana Menü" diff --git a/po/uk_UA.UTF-8.po b/po/uk_UA.UTF-8.po index 2d01b3932..e5b13f918 100644 --- a/po/uk_UA.UTF-8.po +++ b/po/uk_UA.UTF-8.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-03-16 20:16+0200\n" "Last-Translator: Danylo Zalizchuk \n" "Language-Team: Ukrainian \n" @@ -238,7 +238,7 @@ msgstr "" "Вставка цього тексту в термінал може бути небезпечною, оскільки виглядає " "так, ніби деякі команди можуть бути виконані." -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "Закрити" @@ -279,6 +279,14 @@ msgstr "" msgid "Copied to clipboard" msgstr "Скопійовано в буфер обміну" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "Головне меню" diff --git a/po/zh_CN.UTF-8.po b/po/zh_CN.UTF-8.po index 2b5f9f3a1..e122a9719 100644 --- a/po/zh_CN.UTF-8.po +++ b/po/zh_CN.UTF-8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.mitchellh.ghostty\n" "Report-Msgid-Bugs-To: m@mitchellh.com\n" -"POT-Creation-Date: 2025-07-08 15:13-0500\n" +"POT-Creation-Date: 2025-07-11 22:56-0500\n" "PO-Revision-Date: 2025-02-27 09:16+0100\n" "Last-Translator: Leah \n" "Language-Team: Chinese (simplified) \n" @@ -229,7 +229,7 @@ msgid "" "commands may be executed." msgstr "将以下内容粘贴至终端内将可能执行有害命令。" -#: src/apprt/gtk/CloseDialog.zig:47 +#: src/apprt/gtk/CloseDialog.zig:47 src/apprt/gtk/Surface.zig:2520 msgid "Close" msgstr "关闭" @@ -269,6 +269,14 @@ msgstr "分屏内正在运行中的进程将被终止。" msgid "Copied to clipboard" msgstr "已复制至剪贴板" +#: src/apprt/gtk/Surface.zig:2514 +msgid "Command succeeded" +msgstr "" + +#: src/apprt/gtk/Surface.zig:2516 +msgid "Command failed" +msgstr "" + #: src/apprt/gtk/Window.zig:216 msgid "Main Menu" msgstr "主菜单" diff --git a/src/Surface.zig b/src/Surface.zig index a4a8d46df..af0a742c6 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1011,8 +1011,18 @@ fn childExited(self: *Surface, info: apprt.surface.Message.ChildExited) void { log.warn("abnormal process exit detected, showing error message", .{}); - // Update our terminal to note the abnormal exit. In the future we - // may want the apprt to handle this to show some native GUI element. + // Try and show a GUI message. If it returns true, don't do anything else. + if (self.rt_app.performAction( + .{ .surface = self }, + .show_child_exited, + info, + ) catch |err| gui: { + log.err("error trying to show native child exited GUI err={}", .{err}); + break :gui false; + }) return; + + // If a native GUI notification was not showm. update our terminal to + // note the abnormal exit. self.childExitedAbnormally(info) catch |err| { log.err("error handling abnormal child exit err={}", .{err}); return; @@ -1028,6 +1038,18 @@ fn childExited(self: *Surface, info: apprt.surface.Message.ChildExited) void { // surface then they will see this message and know the process has // completed. terminal: { + // First try and show a native GUI message. + if (self.rt_app.performAction( + .{ .surface = self }, + .show_child_exited, + info, + ) catch |err| gui: { + log.err("error trying to show native child exited GUI err={}", .{err}); + break :gui false; + }) break :terminal; + + // If the native GUI can't be shown, display a text message in the + // terminal. self.renderer_state.mutex.lock(); defer self.renderer_state.mutex.unlock(); const t: *terminal.Terminal = self.renderer_state.terminal; diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 1c3c7c72c..201d27e31 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -272,6 +272,9 @@ pub const Action = union(Key) { /// apprt. open_url: OpenUrl, + /// Show a native GUI notification that the child process has exited. + show_child_exited: apprt.surface.Message.ChildExited, + /// Sync with: ghostty_action_tag_e pub const Key = enum(c_int) { quit, @@ -323,6 +326,7 @@ pub const Action = union(Key) { redo, check_for_updates, open_url, + show_child_exited, }; /// Sync with: ghostty_action_u diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index bdb2f0f24..d6a50f0f6 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -521,6 +521,7 @@ pub fn performAction( .ring_bell => try self.ringBell(target), .toggle_command_palette => try self.toggleCommandPalette(target), .open_url => self.openUrl(value), + .show_child_exited => return try self.showChildExited(target, value), // Unimplemented .close_all_windows, @@ -846,6 +847,13 @@ fn toggleCommandPalette(_: *App, target: apprt.Target) !void { } } +fn showChildExited(_: *App, target: apprt.Target, value: apprt.surface.Message.ChildExited) error{}!bool { + switch (target) { + .app => return false, + .surface => |surface| return try surface.rt_surface.showChildExited(value), + } +} + fn quitTimer(self: *App, mode: apprt.action.QuitTimer) void { switch (mode) { .start => self.startQuitTimer(), diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index d16083d5a..a468bd48d 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -2503,3 +2503,40 @@ fn gtkStreamError(media_file: *gtk.MediaFile, _: *gobject.ParamSpec, _: ?*anyopa fn gtkStreamEnded(media_file: *gtk.MediaFile, _: *gobject.ParamSpec, _: ?*anyopaque) callconv(.c) void { media_file.unref(); } + +/// Show native GUI element with a notification that the child process has +/// closed. Return `true` if we are able to show the GUI notification, and +/// `false` if we are not. +pub fn showChildExited(self: *Surface, info: apprt.surface.Message.ChildExited) error{}!bool { + if (!adw_version.supportsBanner()) return false; + + const warning_text, const css_class = if (info.exit_code == 0) + .{ i18n._("Command succeeded"), "child_exited_normally" } + else + .{ i18n._("Command failed"), "child_exited_abnormally" }; + + const banner = adw.Banner.new(warning_text); + banner.setRevealed(1); + banner.setButtonLabel(i18n._("Close")); + + _ = adw.Banner.signals.button_clicked.connect( + banner, + *Surface, + showChildExitedButtonClosed, + self, + .{}, + ); + + const banner_widget = banner.as(gtk.Widget); + banner_widget.setHalign(.fill); + banner_widget.setValign(.end); + banner_widget.addCssClass(css_class); + + self.overlay.addOverlay(banner_widget); + + return true; +} + +fn showChildExitedButtonClosed(_: *adw.Banner, self: *Surface) callconv(.c) void { + self.close(false); +} diff --git a/src/apprt/gtk/style.css b/src/apprt/gtk/style.css index 2051ab1e3..f3106105f 100644 --- a/src/apprt/gtk/style.css +++ b/src/apprt/gtk/style.css @@ -93,3 +93,15 @@ window.ssd.no-border-radius { margin-left: 4px; margin-right: 8px; } + +banner.child_exited_normally revealer widget { + background-color: rgba(38, 162, 105, 0.5); + /* after GTK 4.16 is a requirement, switch to the following: + /* background-color: color-mix(in srgb, var(--success-bg-color), transparent 50%); */ +} + +banner.child_exited_abnormally revealer widget { + background-color: rgba(192, 28, 40, 0.5); + /* after GTK 4.16 is a requirement, switch to the following: + /* background-color: color-mix(in srgb, var(--error-bg-color), transparent 50%); */ +} diff --git a/src/apprt/surface.zig b/src/apprt/surface.zig index 9254b2fd5..1cd53b66a 100644 --- a/src/apprt/surface.zig +++ b/src/apprt/surface.zig @@ -98,7 +98,7 @@ pub const Message = union(enum) { // This enum is a placeholder for future title styles. }; - pub const ChildExited = struct { + pub const ChildExited = extern struct { exit_code: u32, runtime_ms: u64, };