-
Notifications
You must be signed in to change notification settings - Fork 0
/
.wezterm.lua
196 lines (186 loc) · 4.65 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
-- local os = require("os")
local wezterm = require("wezterm")
-- local act = wezterm.action
local config = {
font = wezterm.font("JetBrains Mono Regular"),
font_size = 16.0,
hide_tab_bar_if_only_one_tab = false,
tab_bar_at_bottom = false,
use_dead_keys = false,
enable_tab_bar = false,
use_fancy_tab_bar = false,
window_decorations = "RESIZE",
audible_bell = "Disabled",
color_scheme = "Catppuccin Macchiato",
disable_default_key_bindings = true
}
config.keys = {
-- CTRL-SHIFT-l activates the debug overlay
{ key = 'L', mods = 'SUPER|CTRL', action = wezterm.action.ShowDebugOverlay },
{ key = 't', mods = 'SUPER', action = wezterm.action.SpawnTab 'DefaultDomain' },
{ key = 'n', mods = 'SUPER', action = wezterm.action.SpawnWindow },
{ key = 'w', mods = 'SUPER', action = wezterm.action.CloseCurrentTab { confirm = true} },
{ key = 'v', mods = 'SUPER', action = wezterm.action.PasteFrom "Clipboard"},
{ key = 'c', mods = 'SUPER', action = wezterm.action.PasteFrom "Clipboard"},
}
-- config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 2000 }
-- config.keys = {
-- -- Copy mode
-- {
-- key = "[",
-- mods = "LEADER",
-- action = act.ActivateCopyMode,
-- },
-- -- Show tab navigator; similar to listing panes in tmux
-- {
-- key = "w",
-- mods = "LEADER",
-- action = act.ShowTabNavigator,
-- },
-- -- Create a tab (alternative to Ctrl-Shift-Tab)
-- {
-- key = "c",
-- mods = "LEADER",
-- action = act.SpawnTab("CurrentPaneDomain"),
-- },
-- -- Rename current tab; analagous to command in tmux
-- {
-- key = ",",
-- mods = "LEADER",
-- action = act.PromptInputLine({
-- description = "Enter new name for tab",
-- action = wezterm.action_callback(function(window, _, line)
-- if line then
-- window:active_tab():set_title(line)
-- end
-- end),
-- }),
-- },
-- -- Move to next/previous TAB
-- {
-- key = "n",
-- mods = "LEADER",
-- action = act.ActivateTabRelative(1),
-- },
-- {
-- key = "p",
-- mods = "LEADER",
-- action = act.ActivateTabRelative(-1),
-- },
-- -- Close tab
-- {
-- key = "&",
-- mods = "LEADER|SHIFT",
-- action = act.CloseCurrentTab({ confirm = true }),
-- },
-- -- ----------------------------------------------------------------
-- -- PANES
-- --
-- -- These are great and get me most of the way to replacing tmux
-- -- entirely, particularly as you can use "wezterm ssh" to ssh to another
-- -- server, and still retain Wezterm as your terminal there.
-- -- ----------------------------------------------------------------
-- -- -- Vertical split
-- {
-- -- |
-- key = "v",
-- mods = "LEADER",
-- action = act.SplitPane({
-- direction = "Right",
-- size = { Percent = 50 },
-- }),
-- },
-- -- Horizontal split
-- {
-- -- -
-- key = "s",
-- mods = "LEADER",
-- action = act.SplitPane({
-- direction = "Down",
-- size = { Percent = 50 },
-- }),
-- },
-- {
-- key = "h",
-- mods = "LEADER",
-- action = act({ ActivatePaneDirection = "Left" }),
-- },
-- {
-- key = "j",
-- mods = "LEADER",
-- action = act({ ActivatePaneDirection = "Down" }),
-- },
-- {
-- key = "k",
-- mods = "LEADER",
-- action = act({ ActivatePaneDirection = "Up" }),
-- },
-- {
-- key = "l",
-- mods = "LEADER",
-- action = act({ ActivatePaneDirection = "Right" }),
-- },
-- -- ALT + (h,j,k,l) to resize panes
-- {
-- key = "h",
-- mods = "ALT",
-- action = act({ EmitEvent = "resize-left" }),
-- },
-- {
-- key = "j",
-- mods = "ALT",
-- action = act({ EmitEvent = "resize-down" }),
-- },
-- {
-- key = "k",
-- mods = "ALT",
-- action = act({ EmitEvent = "resize-up" }),
-- },
-- {
-- key = "l",
-- mods = "ALT",
-- action = act({ EmitEvent = "resize-right" }),
-- },
-- -- Close/kill active pane
-- {
-- key = "x",
-- mods = "LEADER",
-- action = act.CloseCurrentPane({ confirm = true }),
-- },
-- -- Swap active pane with another one
-- {
-- key = "{",
-- mods = "LEADER|SHIFT",
-- action = act.PaneSelect({ mode = "SwapWithActiveKeepFocus" }),
-- },
-- -- Zoom current pane (toggle)
-- {
-- key = "z",
-- mods = "LEADER",
-- action = act.TogglePaneZoomState,
-- },
-- {
-- key = "f",
-- mods = "ALT",
-- action = act.TogglePaneZoomState,
-- },
-- -- Move to next/previous pane
-- {
-- key = ";",
-- mods = "LEADER",
-- action = act.ActivatePaneDirection("Prev"),
-- },
-- -- Rotate panes
-- {
-- key = "o",
-- mods = "LEADER",
-- action = act.ActivatePaneDirection("Next"),
-- },
-- {
-- key = "b",
-- mods = "CTRL",
-- action = act.RotatePanes("CounterClockwise"),
-- },
-- { key = "n", mods = "CTRL", action = act.RotatePanes("Clockwise") },
-- }
return config