-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwezterm.lua
More file actions
107 lines (97 loc) · 2.12 KB
/
Copy pathwezterm.lua
File metadata and controls
107 lines (97 loc) · 2.12 KB
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
local wezterm = require("wezterm")
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.line_height = 1.2
config.font = wezterm.font_with_fallback {
'SF Mono',
'Hiragino Sans',
}
config.font_size = 14.0
config.use_ime = true
config.window_background_opacity = 0.85
config.macos_window_background_blur = 20
config.native_macos_fullscreen_mode = true
-- Tab
config.window_decorations = "RESIZE"
config.show_tabs_in_tab_bar = true
config.window_frame = {
inactive_titlebar_bg = "none",
active_titlebar_bg = "none",
}
config.window_background_gradient = {
colors = {
"#000000"
},
}
config.show_new_tab_button_in_tab_bar = false
config.colors = {
tab_bar = {
inactive_tab_edge = "none",
},
}
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
local background = "#283033"
local foreground = "#ffffff"
if tab.is_active then
background = "#ae8b2d"
foreground = "#ffffff"
end
local title = tab.active_pane.title
return {
{ Background = { Color = background } },
{ Foreground = { Color = foreground } },
{ Text = title },
}
end)
-- keybindings
config.keys = {
-- フォントとサイズを大きくする
{
key = "+",
mods = "CMD",
action = wezterm.action.IncreaseFontSize,
},
{
key = "-",
mods = "CMD",
action = wezterm.action.DecreaseFontSize,
},
-- 下方向にペインを分割する
{
key = "d",
mods = "CMD",
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
},
-- 右方向にペインを分割する
{
key = "h",
mods = "CMD",
action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
},
-- ペインを閉じる
{
key = "w",
mods = "CMD",
action = wezterm.action.CloseCurrentPane({ confirm = true }),
},
-- アクティブなペインを移動
{
key = "]",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Next"),
},
{
key = "[",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection("Prev"),
},
-- Enter, cmdでtoggle full screen
{
key = "Enter",
mods = "CMD",
action = wezterm.action.ToggleFullScreen,
},
}
return config