# Add \`on_new_window\` setting \(\#63522\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/810c6a04a689e9979c329b71e1986fb22ce91804)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 810c6a04a689e9979c329b71e1986fb22ce91804

Requested commit: 810c6a04a689e9979c329b71e1986fb22ce91804

Commit: 810c6a04a689e9979c329b71e1986fb22ce91804

Tree: a16b87a46f2e7181caab1095927a07ada882cc88

Author: Albert Bogusz

Committer: GitHub

## Message

```
Add `on_new_window` setting (#63522)

> [!NOTE]
> This is a remake of #63335 as it's unlikely to be reopened just from
my
[mention](https://github.com/zed-industries/zed/pull/63335#issuecomment-5452544138).
Apologies for the noise!

# Objective

Closes #59368, where users (including me) are asking for a way to show
the Launchpad instead of an empty tab when opening a new window. As per
advice from
https://github.com/zed-industries/zed/issues/60720#issuecomment-4936162420,
adding a separate setting from `restore_on_startup` is more ideal.

`on_new_window` allows for two values:
- `empty_tab`
- `launchpad` (default)

## Testing

Added a regression test which opens a new window with `on_new_window`
set to `launchpad` and asserts that no item gets opened in the window's
pane. I've verified it fails without the setting gate, and confirmed
configuring this setting works manually (see Showcase).

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase


https://github.com/user-attachments/assets/bf339bd1-8c62-4243-ac9d-1045d1a14865

---

Release Notes:

- Added `on_new_window` setting to configure the opening of new windows.
```

## Parents

- [cff4edce88d8be881b2ff62ca6d9bf7a6a78ba41](https://git.cafe/gitcafe/zed/commit/cff4edce88d8be881b2ff62ca6d9bf7a6a78ba41?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/810c6a04a689e9979c329b71e1986fb22ce91804?format=markdown)
