Skip to content

Commit d8ac269

Browse files
committed
added wezterm config
1 parent b852b64 commit d8ac269

File tree

2 files changed

+161
-2
lines changed

2 files changed

+161
-2
lines changed

dotfiles/config/wezterm/wezterm.lua

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
-- Pull in the wezterm API
2+
local wezterm = require 'wezterm'
3+
4+
-- This will hold the configuration.
5+
local config = wezterm.config_builder()
6+
local action = wezterm.action
7+
8+
-- For example, changing the color scheme:
9+
config.color_scheme = 'Catppuccin Frappe'
10+
config.font = wezterm.font 'JetBrainsMono Nerd Font Mono'
11+
config.font_size = 18
12+
13+
config.hide_tab_bar_if_only_one_tab = true
14+
15+
config.keys = {
16+
--
17+
-- panes
18+
--
19+
{
20+
key = 'd',
21+
mods = 'CMD',
22+
action = action.SplitHorizontal
23+
},
24+
{
25+
key = 'd',
26+
mods = 'CMD|SHIFT',
27+
action = action.SplitVertical
28+
},
29+
{
30+
key = 'w',
31+
mods = 'CTRL',
32+
action = action.CloseCurrentPane { confirm = false }
33+
},
34+
-- swtiching
35+
{
36+
key = 'LeftArrow',
37+
mods = 'CTRL',
38+
action = action.ActivatePaneDirection 'Left'
39+
},
40+
{
41+
key = 'RightArrow',
42+
mods = 'CTRL',
43+
action = action.ActivatePaneDirection 'Right'
44+
},
45+
{
46+
key = 'UpArrow',
47+
mods = 'CTRL',
48+
action = action.ActivatePaneDirection 'Up'
49+
},
50+
{
51+
key = 'DownArrow',
52+
mods = 'CTRL',
53+
action = action.ActivatePaneDirection 'Down'
54+
},
55+
-- sizing
56+
{
57+
key = 'LeftArrow',
58+
mods = 'CTRL|SHIFT',
59+
action = action.AdjustPaneSize { 'Left', 5 }
60+
},
61+
{
62+
key = 'RightArrow',
63+
mods = 'CTRL|SHIFT',
64+
action = action.AdjustPaneSize { 'Right', 5 }
65+
},
66+
{
67+
key = 'UpArrow',
68+
mods = 'CTRL|SHIFT',
69+
action = action.AdjustPaneSize { 'Up', 5 }
70+
},
71+
{
72+
key = 'DownArrow',
73+
mods = 'CTRL|SHIFT',
74+
action = action.AdjustPaneSize { 'Down', 5 }
75+
},
76+
--
77+
-- spawn
78+
--
79+
{
80+
key = 'd',
81+
mods = 'CTRL|ALT',
82+
action = action.SpawnTab 'CurrentPaneDomain'
83+
},
84+
--
85+
-- loauncher/command pallete
86+
--
87+
{
88+
key = 'p',
89+
mods = 'CMD',
90+
action = action.ActivateCommandPalette
91+
},
92+
{
93+
key = 'p',
94+
mods = 'CMD|SHIFT',
95+
action = action.ShowLauncherArgs {
96+
flags = 'FUZZY|TABS|LAUNCH_MENU_ITEMS|DOMAINS|KEY_ASSIGNMENTS|WORKSPACES|COMMANDS'
97+
}
98+
},
99+
100+
--
101+
-- tabs
102+
--
103+
{
104+
key = 'LeftArrow',
105+
mods = 'CMD|ALT',
106+
action = action.MoveTabRelative(-1)
107+
},
108+
109+
{
110+
key = 'RightArrow',
111+
mods = 'CMD|ALT',
112+
action = action.MoveTabRelative(1)
113+
},
114+
115+
116+
-- scroll
117+
{
118+
key = 'PageDown',
119+
action = action.ScrollByPage(1)
120+
},
121+
{
122+
key = 'PageUp',
123+
action = action.ScrollByPage(-1)
124+
},
125+
{
126+
key = 'PageDown',
127+
mods = 'ALT',
128+
action = action.ScrollByLine(1)
129+
},
130+
{
131+
key = 'PageUp',
132+
mods = 'ALT',
133+
action = action.ScrollByLine(-1)
134+
},
135+
{
136+
key = 'Home',
137+
action = action.ScrollToTop
138+
},
139+
{
140+
key = 'End',
141+
action = action.ScrollToBottom
142+
},
143+
-- links
144+
145+
146+
147+
}
148+
149+
config.mouse_bindings = {
150+
-- Ctrl-click will open the link under the mouse cursor
151+
{
152+
event = { Up = { streak = 1, button = 'Left' } },
153+
mods = 'CMD',
154+
action = action.OpenLinkAtMouseCursor,
155+
},
156+
}
157+
158+
159+
-- and finally, return the configuration to wezterm
160+
return config

vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"editor.codeActionsOnSave": {
1717
"source.organizeImports": "explicit"
1818
},
19-
"editor.colorDecorators": false,
2019
"editor.fontSize": 13,
2120
"editor.fontLigatures": true,
2221
"editor.fontWeight": "400",
@@ -326,7 +325,7 @@
326325
],
327326
"go.toolsManagement.autoUpdate": true,
328327
"gopls": {
329-
"ui.semanticTokens": true,
328+
"ui.semanticTokens": true
330329
},
331330
"redhat.telemetry.enabled": false,
332331
"security.workspace.trust.untrustedFiles": "open",

0 commit comments

Comments
 (0)