-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_wezterm.lua
164 lines (158 loc) · 3.5 KB
/
dot_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
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
local act = wezterm.action
local mux = wezterm.mux
-- 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
config.leader = {
key = 'a',
mods = 'CTRL',
timeout_milliseconds = 2000,
}
config.keys = {
{
key = '[',
mods = 'LEADER',
action = act.ActivateCopyMode,
},
{
key = 'c',
mods = 'LEADER',
action = act.SpawnTab 'CurrentPaneDomain',
},
{
key = 'Tab',
mods = 'LEADER',
action = act.ActivateTabRelative(1),
},
{
key = 'Tab',
mods = 'LEADER|SHIFT',
action = act.ActivateTabRelative(-1),
},
{
key = 'P',
mods = 'LEADER|SHIFT',
action = act.ShowTabNavigator,
},
{
key = 'p',
mods = 'LEADER',
action = wezterm.action.ShowLauncher,
},
{
key = '&',
mods = 'LEADER',
action = act.CloseCurrentTab { confirm = true },
},
{
key = 'x',
mods = 'LEADER',
action = act.CloseCurrentPane { confirm = true },
},
{
-- |
key = 'v',
mods = 'LEADER',
action = act.SplitPane {
direction = 'Right',
size = { Percent = 50 },
},
},
{
-- -
key = 's',
mods = 'LEADER',
action = act.SplitPane {
direction = 'Down',
size = { Percent = 50 },
},
},
{
key = 'z',
mods = 'LEADER',
action = act.TogglePaneZoomState,
},
{
key = 'o',
mods = 'LEADER',
action = act.RotatePanes 'Clockwise',
},
{
key = 'w',
mods = 'LEADER',
action = act.PaneSelect {
mode = 'SwapWithActive',
},
},
{
key = 'LeftArrow',
mods = 'LEADER',
action = act.ActivatePaneDirection 'Left',
},
{
key = 'RightArrow',
mods = 'LEADER',
action = act.ActivatePaneDirection 'Right',
},
{
key = 'DownArrow',
mods = 'LEADER',
action = act.ActivatePaneDirection 'Down',
},
{
key = 'UpArrow',
mods = 'LEADER',
action = act.ActivatePaneDirection 'Up',
},
{
key = 'd',
mods = 'LEADER',
action = act.DetachDomain 'CurrentPaneDomain',
},
{
key = 'm',
mods = 'LEADER',
action = wezterm.action.PaneSelect,
},
}
config.mouse_bindings = {
-- Open URLs with CMD+Click
{
event = { Up = { streak = 1, button = 'Left' } },
mods = 'CMD',
action = wezterm.action.OpenLinkAtMouseCursor,
},
}
config.audible_bell = 'Disabled'
config.color_scheme = 'Gruvbox Material (Gogh)'
config.colors = { tab_bar = { active_tab = { fg_color = '#073642', bg_color = '#2aa198' } } }
config.enable_kitty_keyboard = true
config.enable_scroll_bar = true
config.font = wezterm.font 'Fira Code'
config.font_size = 14.
config.force_reverse_video_cursor = true
config.hide_tab_bar_if_only_one_tab = true
config.hyperlink_rules = wezterm.default_hyperlink_rules()
config.native_macos_fullscreen_mode = true
config.pane_focus_follows_mouse = true
config.scrollback_lines = 5000
config.switch_to_last_active_tab_when_closing_tab = true
config.tab_bar_at_bottom = true
config.term = 'wezterm'
config.use_dead_keys = true
config.use_fancy_tab_bar = false
config.window_padding = { left = 0, right = 0, top = 0, bottom = 0 }
-- and finally, return the configuration to wezterm
--
wezterm.on('gui-startup', function()
local tab, pane, window = mux.spawn_window {}
window:gui_window():maximize()
end)
return config