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,8 +79,10 @@ pub fn newConfig(app: *const App, config: *const Config) !Config {
|
|||||||
// Get our previously focused surface for some inherited values.
|
// Get our previously focused surface for some inherited values.
|
||||||
const prev = app.focusedSurface();
|
const prev = app.focusedSurface();
|
||||||
if (prev) |p| {
|
if (prev) |p| {
|
||||||
if (try p.pwd(alloc)) |pwd| {
|
if (config.@"window-inherit-working-directory") {
|
||||||
copy.@"working-directory" = pwd;
|
if (try p.pwd(alloc)) |pwd| {
|
||||||
|
copy.@"working-directory" = pwd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,6 +309,12 @@ keybind: Keybinds = .{},
|
|||||||
/// to balance the padding given a certain viewport size and grid cell size.
|
/// to balance the padding given a certain viewport size and grid cell size.
|
||||||
@"window-padding-balance": bool = false,
|
@"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
|
/// If true, new windows and tabs will inherit the font size of the previously
|
||||||
/// focused window. If no window was previously focused, the default
|
/// focused window. If no window was previously focused, the default
|
||||||
/// font size will be used. If this is false, the default font size
|
/// font size will be used. If this is false, the default font size
|
||||||
|
Reference in New Issue
Block a user