-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwezterm.lua
127 lines (120 loc) · 3.25 KB
/
wezterm.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
local wezterm = require("wezterm")
local config = {}
local act = wezterm.action
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- local mux = wezterm.mux
--
-- local cache_dir = os.getenv("HOME") .. "/.cache/wezterm/"
-- local window_size_cache_path = cache_dir .. "window_size_cache.txt"
-- wezterm.on("gui-startup", function()
-- os.execute("mkdir " .. cache_dir)
--
-- local window_size_cache_file = io.open(window_size_cache_path, "r")
-- if window_size_cache_file ~= nil then
-- _, _, width, height = string.find(window_size_cache_file:read(), "(%d+),(%d+)")
-- mux.spawn_window({ width = tonumber(width), height = tonumber(height) })
-- window_size_cache_file:close()
-- else
-- local tab, pane, window = mux.spawn_window({})
-- window:gui_window():maximize()
-- end
-- end)
--
-- wezterm.on("window-resized", function(window, pane)
-- local window_size_cache_file = io.open(window_size_cache_path, "r")
-- if window_size_cache_file == nil then
-- local tab_size = pane:tab():get_size()
-- cols = tab_size["cols"]
-- rows = tab_size["rows"] + 2 -- Without adding the 2 here, the window doesn't maximize
-- contents = string.format("%d,%d", cols, rows)
-- window_size_cache_file = assert(io.open(window_size_cache_path, "w"))
-- window_size_cache_file:write(contents)
-- window_size_cache_file:close()
-- end
-- end)
config = {
skip_close_confirmation_for_processes_named = {
"unified-search", -- used as a launcher
},
colors = {
ansi = {
"#1e1e1e",
"#f44747",
"#608b4e",
"#dcdcaa",
"#569cd6",
"#c678dd",
"#56b6c2",
"#d4d4d4",
},
brights = {
"#808080",
"#f44747",
"#608b4e",
"#dcdcaa",
"#569cd6",
"#c678dd",
"#56b6c2",
"#d4d4d4",
},
cursor_bg = "#d4d4d4",
cursor_border = "#d4d4d4",
cursor_fg = "#1e1e1e",
foreground = "#d4d4d4",
selection_bg = "#dcdcaa",
selection_fg = "#1e1e1e",
background = "#1e1e1e",
},
enable_wayland = true,
-- color_scheme = "Kanagawa (Gogh)",
-- color_scheme = "Gruvbox Material (Gogh)",
-- color_scheme = "GruvboxDarkHard",
font_size = 18,
front_end = "WebGpu",
webgpu_power_preference = "HighPerformance",
-- font = wezterm.font 'Iosevka',
-- font = wezterm.font_with_fallback({
-- -- "Iosevka",
-- { family = "Iosevka", weight = "Regular" },
-- -- { family = "JetBrains Mono", weight = "Regular" },
-- -- { family = "Symbols Nerd Font Mono", scale = 1 },
-- }),
integrated_title_button_style = "Gnome",
-- hide_tab_bar_if_only_one_tab = true,
-- enable_scroll_bar = true,
window_padding = {
left = 10,
right = 10,
top = 10,
bottom = 10,
},
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
keys = {
{ key = "p", mods = "CTRL", action = wezterm.action.ShowLauncherArgs({ flags = "FUZZY|COMMANDS|WORKSPACES" }) },
{
key = "W",
mods = "CTRL|SHIFT",
action = act.PromptInputLine({
description = wezterm.format({
{ Attribute = { Intensity = "Bold" } },
{ Foreground = { AnsiColor = "Fuchsia" } },
{ Text = "Enter name for new workspace" },
}),
action = wezterm.action_callback(function(window, pane, line)
if line then
window:perform_action(
act.SwitchToWorkspace({
name = line,
}),
pane
)
end
end),
}),
},
},
}
return config