-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.wezterm.lua
34 lines (31 loc) · 1.02 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
local wezterm = require("wezterm")
local config = wezterm.config_builder()
config.color_scheme = "Afterglow"
config.font = wezterm.font("MesloLGS Nerd Font Mono")
config.window_background_opacity = 0.85
-- make the window with blur
config.macos_window_background_blur = 20
-- integration with vim zen mode
wezterm.on("user-var-changed", function(window, pane, name, value)
local overrides = window:get_config_overrides() or {}
if name == "ZEN_MODE" then
local incremental = value:find("+")
local number_value = tonumber(value)
if incremental ~= nil then
while number_value > 0 do
window:perform_action(wezterm.action.IncreaseFontSize, pane)
number_value = number_value - 1
end
overrides.enable_tab_bar = false
elseif number_value < 0 then
window:perform_action(wezterm.action.ResetFontSize, pane)
overrides.font_size = nil
overrides.enable_tab_bar = true
else
overrides.font_size = number_value
overrides.enable_tab_bar = false
end
end
window:set_config_overrides(overrides)
end)
return config