mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
Merge pull request #620 from mitchellh/window-inherit-wd
config: add option to disable working directory inheritance
This commit is contained in:
@ -79,10 +79,12 @@ pub fn newConfig(app: *const App, config: *const Config) !Config {
|
||||
// Get our previously focused surface for some inherited values.
|
||||
const prev = app.focusedSurface();
|
||||
if (prev) |p| {
|
||||
if (config.@"window-inherit-working-directory") {
|
||||
if (try p.pwd(alloc)) |pwd| {
|
||||
copy.@"working-directory" = pwd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
@ -309,6 +309,12 @@ keybind: Keybinds = .{},
|
||||
/// to balance the padding given a certain viewport size and grid cell size.
|
||||
@"window-padding-balance": bool = false,
|
||||
|
||||
/// If true, new windows and tabs will inherit the working directory of
|
||||
/// the previously focused window. If no window was previously focused,
|
||||
/// the default working directory will be used (the "working-directory"
|
||||
/// option).
|
||||
@"window-inherit-working-directory": bool = true,
|
||||
|
||||
/// If true, new windows and tabs will inherit the font size of the previously
|
||||
/// focused window. If no window was previously focused, the default
|
||||
/// font size will be used. If this is false, the default font size
|
||||
|
Reference in New Issue
Block a user