feat: add a quit action
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run

This commit is contained in:
2026-10-06 17:19:21 +07:00
parent 237b6a6996
commit 8900d1f3ee
+5
View File
@@ -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);