-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_wezterm.lua
72 lines (64 loc) · 1.56 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
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- This will hold the configuration.
local config = wezterm.config_builder()
-- This is where you actually apply your config choices
local function get_appearance()
if wezterm.gui then
return wezterm.gui.get_appearance()
end
return "Dark"
end
local function scheme_for_appearance(appearance)
if appearance:find("Dark") then
return "Dracula (Official)"
else
return "Londontube (light) (terminal.sexy)"
end
end
-- Apply the color scheme
config.color_scheme = scheme_for_appearance(get_appearance())
-- Other configurations
config.font = wezterm.font("MesloLGS NF")
config.window_decorations = "RESIZE"
config.check_for_updates = false
config.window_background_opacity = 0.95
config.macos_window_background_blur = 20
-- Key bindings
config.keys = {
-- Split horizontal
{
key = "d",
mods = "CMD",
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
},
-- Split vertical
{
key = "d",
mods = "CMD|SHIFT",
action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
},
-- Navigation entre les panes
{
key = "LeftArrow",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Left"),
},
{
key = "RightArrow",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Right"),
},
{
key = "UpArrow",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Up"),
},
{
key = "DownArrow",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Down"),
},
}
-- and finally, return the configuration to wezterm
return config