From 8900d1f3ee849947f31e4aa33ea1a9580d711250 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Tue, 6 Oct 2026 17:19:21 +0700 Subject: [PATCH] feat: add a quit action --- desktop/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/src/main.rs b/desktop/src/main.rs index 18f085c..d60f470 100644 --- a/desktop/src/main.rs +++ b/desktop/src/main.rs @@ -7,6 +7,8 @@ use gpui_component::{Theme, ThemeMode, ThemeRegistry, theme}; use gpui_platform::application; use settings::{AppearanceMode, SettingsStore}; +actions!(signed, [Quit]); + fn main() { tracing_subscriber::fmt::init(); @@ -17,6 +19,9 @@ fn main() { gpui_component::init(cx); theme::init(cx); + cx.bind_keys([KeyBinding::new("secondary-q", Quit, None)]); + cx.on_action(|_: &Quit, cx| cx.quit()); + // The persisted settings must load before the theme is applied. let store = cx.new(|cx| SettingsStore::new(paths::settings_file(), cx)); SettingsStore::set_global(store.clone(), cx);