mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
Add quit_when_all_windows_are_closed config option
refs: https://github.com/wez/wezterm/issues/3057
This commit is contained in:
parent
0b2345a46f
commit
6968ad5c3c
@ -671,6 +671,9 @@ pub struct Config {
|
||||
#[dynamic(default = "default_stateless_process_list")]
|
||||
pub skip_close_confirmation_for_processes_named: Vec<String>,
|
||||
|
||||
#[dynamic(default = "default_true")]
|
||||
pub quit_when_all_windows_are_closed: bool,
|
||||
|
||||
#[dynamic(default = "default_true")]
|
||||
pub warn_about_missing_glyphs: bool,
|
||||
|
||||
|
@ -66,6 +66,8 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* macOS: added a dock menu that allows spawning new windows. Thanks to
|
||||
[@dahlia](https://github.com/dahlia)!
|
||||
[#3054](https://github.com/wez/wezterm/pull/3054)
|
||||
* [quit_when_all_windows_are_closed](config/lua/config/quit_when_all_windows_are_closed.md)
|
||||
configuration option.
|
||||
|
||||
#### Fixed
|
||||
* X11: hanging or killing the IME could hang wezterm
|
||||
|
@ -0,0 +1,9 @@
|
||||
# `quit_when_all_windows_are_closed = true`
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
When set to `true`, wezterm will terminate when all windows are closed. This is
|
||||
the default behavior.
|
||||
|
||||
When set to `false`, wezterm will continue running.
|
||||
|
@ -103,8 +103,7 @@ impl GuiFrontEnd {
|
||||
| Alert::SetUserVar { .. },
|
||||
} => {}
|
||||
MuxNotification::Empty => {
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
{
|
||||
if config::configuration().quit_when_all_windows_are_closed {
|
||||
promise::spawn::spawn_into_main_thread(async move {
|
||||
if mux::activity::Activity::count() == 0 {
|
||||
log::trace!("Mux is now empty, terminate gui");
|
||||
|
Loading…
Reference in New Issue
Block a user