-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.wezterm.lua
169 lines (162 loc) · 3.43 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.set_environment_variables = {
TERMINFO_DIRS = '~/.terminfo',
}
config.term = 'wezterm'
--config.use_ime = false
config.use_dead_keys = false
config.color_scheme = 'Andromeda'
config.font = wezterm.font 'Iosevka Comfy'
config.font_size = 13.0
config.window_decorations = "RESIZE"
config.use_fancy_tab_bar = false
config.tab_max_width = 32
config.colors = {
selection_fg = 'black',
selection_bg = '#f0faa0',
tab_bar = {
background = '#1a1e27',
active_tab = {
bg_color = '#262a33',
fg_color = '#c0c0c0',
},
inactive_tab = {
bg_color = '#1a1e27',
fg_color = '#808080',
},
new_tab = {
bg_color = '#1a1e27',
fg_color = '#808080',
}
}
}
local act = wezterm.action
config.keys = {
-- tilde hack as it does not work w/o deadkeys enabled
{
key = "n",
mods = "OPT",
action = act { SendString = "~" },
},
-- remove keys I need in emacs
{
key = '_',
mods = 'CTRL|SHIFT',
action = act.DisableDefaultAssignment,
},
{
key = 'LeftArrow',
mods = 'CTRL|SHIFT',
action = act.DisableDefaultAssignment,
},
{
key = 'RightArrow',
mods = 'CTRL|SHIFT',
action = act.DisableDefaultAssignment,
},
{
key = 'DownArrow',
mods = 'CTRL|SHIFT',
action = act.DisableDefaultAssignment,
},
{
key = 'UpArrow',
mods = 'CTRL|SHIFT',
action = act.DisableDefaultAssignment,
},
-- split
{
key = 'd',
mods = 'CMD',
action = act.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
{
key = 'd',
mods = 'CMD|SHIFT',
action = act.SplitVertical { domain = 'CurrentPaneDomain' },
},
-- pane selection
{
key = '9',
mods = 'CTRL',
action = act.PaneSelect {
alphabet = '123456789',
},
},
-- show the pane selection mode, but have it swap the active and selected panes
{
key = '0',
mods = 'CTRL',
action = act.PaneSelect {
alphabet = '123456789',
mode = 'SwapWithActive',
},
},
{
key = 'LeftArrow',
mods = 'CMD|META',
action = act.ActivatePaneDirection 'Left',
},
{
key = 'RightArrow',
mods = 'CMD|META',
action = act.ActivatePaneDirection 'Right',
},
{
key = 'UpArrow',
mods = 'CMD|META',
action = act.ActivatePaneDirection 'Up',
},
{
key = 'DownArrow',
mods = 'CMD|META',
action = act.ActivatePaneDirection 'Down',
},
-- resize panes
{
key = 'UpArrow',
mods = 'CMD|SHIFT',
action = act.AdjustPaneSize { 'Up', 1 },
},
{
key = 'DownArrow',
mods = 'CMD|SHIFT',
action = act.AdjustPaneSize { 'Down', 1 },
},
{
key = 'LeftArrow',
mods = 'CMD|SHIFT',
action = act.AdjustPaneSize { 'Left', 1 },
},
{
key = 'RightArrow',
mods = 'CMD|SHIFT',
action = act.AdjustPaneSize { 'Right', 1 },
},
-- tab selection
{
key = 'LeftArrow',
mods = 'CMD',
action = act.ActivateTabRelative(-1),
},
{
key = 'RightArrow',
mods = 'CMD',
action = act.ActivateTabRelative(1),
},
}
config.mouse_bindings = {
-- Scrolling up/down while holding CMD adjusts the panel size
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = 'CMD',
action = act.AdjustPaneSize { 'Left', 1 },
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = 'CMD',
action = act.AdjustPaneSize { 'Right', 1 },
},
}
return config