-
Notifications
You must be signed in to change notification settings - Fork 0
/
.wezterm.lua
50 lines (45 loc) · 1.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
-- Helper function:
-- returns color scheme dependant on operating system theme setting (dark/light)
local function color_scheme_for_appearance(appearance)
if appearance:find("Dark") then
return "Tokyo Night"
else
return "Tokyo Night Day"
end
end
-- Pull in WezTerm API
local wezterm = require("wezterm")
-- Initialize actual config
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- Appearance
config.font_size = 14.0
config.color_scheme = color_scheme_for_appearance(wezterm.gui.get_appearance())
config.window_decorations = "RESIZE"
config.hide_tab_bar_if_only_one_tab = true
config.native_macos_fullscreen_mode = false
config.macos_window_background_blur = 10
config.window_background_opacity = 0.92
-- Keybindings
config.keys = {
-- Default QuickSelect keybind (CTRL-SHIFT-Space) gets captured by something
-- else on my system
{
key = "A",
mods = "CTRL|SHIFT",
action = wezterm.action.QuickSelect,
},
-- Quickly open config file with common macOS keybind
{
key = ",",
mods = "SUPER",
action = wezterm.action.SpawnCommandInNewWindow({
cwd = os.getenv("WEZTERM_CONFIG_DIR"),
args = { os.getenv("SHELL"), "-c", "$VISUAL $WEZTERM_CONFIG_FILE" },
}),
},
}
-- Return config to WezTerm
return config