remove auto theme include in config-template
parent
e58bbc1d3e
commit
f7d0d72f19
|
|
@ -2,6 +2,7 @@ const std = @import("std");
|
||||||
const args = @import("args.zig");
|
const args = @import("args.zig");
|
||||||
const Action = @import("ghostty.zig").Action;
|
const Action = @import("ghostty.zig").Action;
|
||||||
const Config = @import("../config/Config.zig");
|
const Config = @import("../config/Config.zig");
|
||||||
|
const configpkg = @import("../config.zig");
|
||||||
const themepkg = @import("../config/theme.zig");
|
const themepkg = @import("../config/theme.zig");
|
||||||
const tui = @import("tui.zig");
|
const tui = @import("tui.zig");
|
||||||
const global_state = &@import("../global.zig").state;
|
const global_state = &@import("../global.zig").state;
|
||||||
|
|
@ -197,7 +198,7 @@ pub fn run(gpa_alloc: std.mem.Allocator) !u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resolveAutoThemePath(alloc: std.mem.Allocator) ![]u8 {
|
fn resolveAutoThemePath(alloc: std.mem.Allocator) ![]u8 {
|
||||||
const main_cfg_path = try Config.preferredDefaultFilePath(alloc);
|
const main_cfg_path = try configpkg.preferredDefaultFilePath(alloc);
|
||||||
defer alloc.free(main_cfg_path);
|
defer alloc.free(main_cfg_path);
|
||||||
|
|
||||||
const base_dir = std.fs.path.dirname(main_cfg_path) orelse return error.BadPathName;
|
const base_dir = std.fs.path.dirname(main_cfg_path) orelse return error.BadPathName;
|
||||||
|
|
@ -815,8 +816,8 @@ const Preview = struct {
|
||||||
.save => {
|
.save => {
|
||||||
const theme = self.themes[self.filtered.items[self.current]];
|
const theme = self.themes[self.filtered.items[self.current]];
|
||||||
|
|
||||||
const width = 90;
|
const width = 92;
|
||||||
const height = 12;
|
const height = 17;
|
||||||
const child = win.child(
|
const child = win.child(
|
||||||
.{
|
.{
|
||||||
.x_off = win.width / 2 -| width / 2,
|
.x_off = win.width / 2 -| width / 2,
|
||||||
|
|
@ -839,7 +840,10 @@ const Preview = struct {
|
||||||
"",
|
"",
|
||||||
"Save the configuration file and then reload it to apply the new theme.",
|
"Save the configuration file and then reload it to apply the new theme.",
|
||||||
"",
|
"",
|
||||||
"Or press 'w' to write an auto theme file.",
|
"Or press 'w' to write an auto theme file to your system's preferred default config path.",
|
||||||
|
"Then add the following line to your Ghostty configuration and reload:",
|
||||||
|
"",
|
||||||
|
"config-file = ?auto/theme.ghostty",
|
||||||
"",
|
"",
|
||||||
"For more details on configuration and themes, visit the Ghostty documentation:",
|
"For more details on configuration and themes, visit the Ghostty documentation:",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,6 @@
|
||||||
# reloaded while running; some only apply to new windows and others may require
|
# reloaded while running; some only apply to new windows and others may require
|
||||||
# a full restart to take effect.
|
# a full restart to take effect.
|
||||||
|
|
||||||
# Auto theme include
|
|
||||||
# ==================
|
|
||||||
# This include makes it easy to pick a theme via `ghostty +list-themes`:
|
|
||||||
# press Enter on a theme, then 'w' to write the auto theme file.
|
|
||||||
# This path is relative to this config file.
|
|
||||||
config-file = ?auto/theme.ghostty
|
|
||||||
|
|
||||||
# Config syntax crash course
|
# Config syntax crash course
|
||||||
# ==========================
|
# ==========================
|
||||||
# # The config file consists of simple key-value pairs,
|
# # The config file consists of simple key-value pairs,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue