forked from joshmedeski/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.wezterm.lua
213 lines (212 loc) · 4.44 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
local wezterm = require 'wezterm'
return {
default_prog = {"/opt/homebrew/bin/fish"},
term = 'wezterm',
color_scheme = "nord",
font = wezterm.font_with_fallback(
{
'FiraCode Nerd Font',
'Fira Code Nerd Font Mono',
'SFMono Nerd Font',
'Hack Nerd Font',
'Source Code Pro',
'Monaco',
'Menlo'
},
{ weight = "Medium"}
),
font_size = 16.0,
window_background_opacity = 0.8,
enable_tab_bar = false,
window_decorations = "RESIZE",
keys = {
{
-- select tmux window 1
key = "1",
mods = "SUPER",
action = wezterm.action.SendString '\x021'
},
{
-- 2
key = "2",
mods = "SUPER",
action = wezterm.action.SendString '\x022'
},
{
-- 3
key = "3",
mods = "SUPER",
action = wezterm.action.SendString '\x023'
},
{
-- 4
key = "4",
mods = "SUPER",
action = wezterm.action.SendString '\x024'
},
{
-- 5
key = "5",
mods = "SUPER",
action = wezterm.action.SendString '\x025'
},
{
-- 6
key = "6",
mods = "SUPER",
action = wezterm.action.SendString '\x026'
},
{
-- 7
key = "7",
mods = "SUPER",
action = wezterm.action.SendString '\x027'
},
{
-- 8
key = "8",
mods = "SUPER",
action = wezterm.action.SendString '\x028'
},
{
-- 9
key = "9",
mods = "SUPER",
action = wezterm.action.SendString '\x029'
},
{
-- rename current tmux window
key = ",",
mods = "SUPER",
action = wezterm.action.SendString '\x02,'
},
{
-- open lazydocker
key = "d",
mods = "SUPER",
action = wezterm.action.SendString '\x02K'
},
{
-- split tmux window vertically
key = "e",
mods = "SUPER",
action = wezterm.action.SendString '\x02\"'
},
{
-- split tmux window horizontally
key = "e",
mods = "SUPER|SHIFT",
action = wezterm.action.SendString "\x02%"
},
{
-- open file manager 'gokcehan/lf'
key = "f",
mods = "SUPER",
action = wezterm.action.SendString 'lfcd\n'
},
{
-- open git manager 'jesseduffield/lazygit'
key = "g",
mods = "SUPER",
action = wezterm.action.SendString '\x02g'
},
{
-- open tmux smart session manager
key = "j",
mods = "SUPER",
action = wezterm.action.SendString '\x02\x54'
},
{
-- open interactive tmux session client
key = "k",
mods = "SUPER",
action = wezterm.action.SendString '\x02s'
},
{
-- switch to last tmux session
key = "l",
mods = "SUPER",
action = wezterm.action.SendString '\x02L'
},
{
-- navigate back (ctrl+o)
key = "[",
mods = "SUPER",
action = wezterm.action.SendString '\x0f'
},
{
-- switch to next tmux window
key = "[",
mods = "SUPER|SHIFT",
action = wezterm.action.SendString '\x02p'
},
{
key = "o",
mods = "SUPER",
action = wezterm.action.SendString '\x02u'
},
{
-- files
key = "p",
mods = "SUPER",
action = wezterm.action.SendString ':GoToFile\n'
},
{
-- commands
key = "p",
mods = "SUPER|SHIFT",
action = wezterm.action.SendString ':GoToCommand\n'
},
{
-- quit vim
key = "q",
mods = "SUPER",
action = wezterm.action.SendString ':q\n'
},
{
key = "r",
mods = "SUPER",
action = wezterm.action.SendString '\x1b\x5b\x41\x0a'
},
{
key = "]",
mods = "SUPER",
action = wezterm.action.SendString '\x09'
},
{
key = "]",
mods = "SUPER|SHIFT",
action = wezterm.action.SendString '\x02n'
},
{
-- save vim buffer
key = "s",
mods = "SUPER",
action = wezterm.action.SendString '\x1b\x3a\x77\x0a'
},
{
-- save all
key = "s",
mods = "SUPER|SHIFT",
action = wezterm.action.SendString ':wa\n'
},
{
-- enter tmux command prompt
key = "t",
mods = "SUPER",
action = wezterm.action.SendString '\x02c'
},
{
-- kill the current pane
key = "w",
mods = "SUPER",
action = wezterm.action.SendString '\x02x'
},
{
-- toggle zoom state of the current tmux pane
key = "z",
mods = "SUPER",
action = wezterm.action.SendString '\x02z'
}
}
}