T16: the settings window: Cmd-, opens it or brings it forward and Cmd-W closes it, Ctrl-, and Ctrl-Shift-W off macOS; General's rows in Ely's settings layout, Shell in Ely's path input and Start in as Home or the session's folder, each change checked, saved and applied to new sessions at once; a shell saves only when it names a program, else the row says why; the app quits with its last terminal window; shot aims at either window with to:settings and to:main
This commit is contained in:
5 files changed
+321
-23
No files matched your search
+9
-3
@@ -10,7 +10,7 @@ use gpui::{
|
||||
#[cfg(target_os = "macos")]
|
||||
use crate::term::mac;
|
||||
use crate::{
|
||||
settings::SettingsStore,
|
||||
settings::{self, SettingsStore},
|
||||
term::{ICONS, Launch, MONO, config, input, shell::ShellIntegration, spawn},
|
||||
themes,
|
||||
workspace::{self, TITLE, Workspace},
|
||||
@@ -41,9 +41,15 @@ pub fn start(cx: &mut App) -> anyhow::Result<()> {
|
||||
ShellIntegration::init(cx)?;
|
||||
input::bind_keys(cx);
|
||||
workspace::bind_keys(cx);
|
||||
settings::window::bind_keys(cx);
|
||||
// Settings alone hold no terminal, so they go with the last one.
|
||||
cx.on_window_closed(|cx, _| {
|
||||
if cx.windows().is_empty() {
|
||||
log::info!("app: no window left; quitting");
|
||||
let windows = cx.windows();
|
||||
if !windows
|
||||
.iter()
|
||||
.any(|window| window.downcast::<Workspace>().is_some())
|
||||
{
|
||||
log::info!("app: no terminal window left; quitting");
|
||||
cx.quit();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user