-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_wezterm.lua.tmpl
94 lines (87 loc) · 2.29 KB
/
dot_wezterm.lua.tmpl
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
-- Pull in the wezterm API
local wezterm = require 'wezterm'
local act = wezterm.action
local mux = wezterm.mux
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Dracula+'
-- config.color_scheme = 'Humanoid dark (base16)'
config.scrollback_lines = 10000
-- default shell
{{- if eq .chezmoi.os "windows" }}
config.default_prog = {'C:\\Users\\jackwenyoung\\AppData\\Local\\Programs\\nu\\bin\\nu.exe'}
config.font = wezterm.font 'Hack Nerd Font Mono Bold'
config.window_background_opacity = 0.6
config.font_size = 14.0
{{- else if eq .chezmoi.os "darwin" }}
config.window_background_opacity = 0.75
config.font = wezterm.font 'Hack Nerd Font Propo'
config.default_prog = {'/opt/homebrew/bin/nu'}
config.font_size = 16.0
{{- else }}
config.font = wezterm.font 'Hack Nerd Font Mono Bold'
config.default_prog = {'/usr/bin/nu'}
config.font_size = 16.0
{{- end }}
-- key mappings
config.leader = { key = 'z', mods = 'CTRL', timeout_milliseconds = 1000}
config.launch_menu = {}
config.keys = {
{
key = 'h',
mods = 'LEADER',
action = act.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
{
key = 'v',
mods = 'LEADER',
action = act.SplitVertical { domain = 'CurrentPaneDomain' },
},
{
key = 'w',
mods = 'LEADER',
action = act.CloseCurrentPane { confirm = true },
},
-- {
-- key = 'c',
-- mods = 'LEADER',
-- action = act.SpawnCommandInNewTab {},
-- },
{
key = 'l',
mods = 'LEADER',
action = act.ShowLauncher,
},
{
key = 'q',
mods = 'LEADER',
action = act.QuickSelect,
},
{
key = 'k',
mods = 'CTRL',
action = act.ScrollByPage(-1),
},
{
key = 'j',
mods = 'CTRL',
action = act.ScrollByPage(1),
},
}
-- Show which key table is active in the status area
wezterm.on('update-right-status', function(window, pane)
local name = window:active_key_table()
if name then
name = 'TABLE: ' .. name
end
window:set_right_status(name or '')
end)
-- and finally, return the configuration to wezterm
return config