Skip to content

Comments

gtk: +new-window now respects --working-directory and -e#10809

Open
jcollie wants to merge 3 commits intoghostty-org:mainfrom
jcollie:gtk-new-window-ipc
Open

gtk: +new-window now respects --working-directory and -e#10809
jcollie wants to merge 3 commits intoghostty-org:mainfrom
jcollie:gtk-new-window-ipc

Conversation

@jcollie
Copy link
Member

@jcollie jcollie commented Feb 18, 2026

Fixes: #8862
Fixes: #10716

This adds the machinery to pass configuration settings received over DBus down to the GObject Surface so that that configuration information can be used to override some settings from the current "live" config when creating a new window. Currently it's only possible to override --working-directory, --command, and --title. -e on the ghostty +new-window CLI works as well.

Adding more overridable settings is possible, but being able to fully override any possible setting would better be served with a major revamp of how Ghostty handles configs, which I is way out of scope at the moment.

@jcollie jcollie requested review from a team as code owners February 18, 2026 02:35
@00-kat 00-kat added os/linux gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Feb 18, 2026
@jcollie jcollie added this to the 1.3.0 milestone Feb 18, 2026
@jcollie jcollie added the cli `ghostty` command-line interface label Feb 18, 2026
@WieeRd
Copy link

WieeRd commented Feb 19, 2026

If it doesn't take too much effort, may I request support for just one more flag: --x11-instance-name? As mentioned in #8862 (comment), without this option certain features of window managers are impossible to be integrated with single instance mode.

@jcollie
Copy link
Member Author

jcollie commented Feb 19, 2026

@WieeRd Unfortunately that's impossible since that property is a per-display-connection setting. Since Ghostty is a single process and has a single connection to the display manager we can't change it after the process starts up.

Fixes: ghostty-org#8862
Fixes: ghostty-org#10716

This adds the machinery to pass configuration settings received over
DBus down to the GObject Surface so that that configuration information
can be used to override some settings from the current "live" config
when creating a new window. Currently it's only possible to override
`--working-directory` and `--command`. `-e` on the `ghostty +new-window`
CLI works as well.

Adding more overridable settings is possible, but being able to fully
override any possible setting would better be served with a major
revamp of how Ghostty handles configs, which I is way out of scope at
the moment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli `ghostty` command-line interface gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GTK: Allow specifying working directory with +new-window gtk: Make the -e flag for +new-window work

3 participants