Ostatnio aktywny 1762676433

wezterm.lua Surowy
1local wezterm = require 'wezterm'
2local act = wezterm.action
3
4local config = {}
5
6if wezterm.config_builder then config = wezterm.config_builder() end
7
8config.quit_when_all_windows_are_closed = false
9config.scrollback_lines = 50000
10config.enable_scroll_bar = true
11config.audible_bell = "Disabled"
12
13
14
15-- Visuals
16
17config.font = wezterm.font_with_fallback {
18 {
19 family = '0xProto',
20 weight = 'Regular', -- https://wezfurlong.org/wezterm/config/lua/wezterm/font.html
21 harfbuzz_features = { -- https://wezfurlong.org/wezterm/config/font-shaping.html
22 'calt=0',
23 'clig=0',
24 'liga=0'
25 }
26 },
27 {
28 family = "Apple Color Emoji",
29 weight = "Regular",
30 stretch = "Normal",
31 style = "Normal"
32 },
33 'Noto Color Emoji'
34}
35
36config.font_rules = {
37
38 {
39 intensity = 'Bold',
40 italic = false,
41 font = wezterm.font {
42 family = '0xProto',
43 weight = "Bold",
44 },
45 },
46
47 {
48 intensity = 'Normal',
49 italic = true,
50 font = wezterm.font {
51 family = '0xProto',
52 style = "Italic",
53 weight = "Regular",
54 },
55 },
56
57 {
58 intensity = 'Bold',
59 italic = true,
60 font = wezterm.font {
61 family = '0xProto',
62 style = "Italic",
63 weight = 'Bold',
64 },
65 }
66
67}
68
69config.font_size = 14
70config.line_height = 1.0
71
72config.window_frame = {
73 font = wezterm.font {family = 'Iosevka Aile', weight = 700},
74 font_size = 14.0,
75 active_titlebar_bg = '#eeeeee',
76 inactive_titlebar_bg = '#ffffff'
77}
78
79config.use_fancy_tab_bar = true
80
81
82-- Colors
83
84local atom_one_light = wezterm.color.get_builtin_schemes()['AtomOneLight']
85local color_scheme = wezterm.color.get_builtin_schemes()['AtomOneLight']
86
87color_scheme.copy_mode_active_highlight_bg = { Color = '#e80da2' }
88color_scheme.copy_mode_active_highlight_fg = { Color = '#ffffff' }
89color_scheme.copy_mode_inactive_highlight_bg = { Color = '#eac7df' }
90color_scheme.copy_mode_inactive_highlight_fg = { Color = '#000000' }
91color_scheme.selection_fg = '#ffffff'
92color_scheme.selection_bg = '#e80da2'
93color_scheme.cursor_fg = '#ffffff'
94color_scheme.cursor_bg = '#e80da2'
95
96config.color_schemes = {
97 ['AtomOneLight'] = atom_one_light,
98 ['mjaschen'] = color_scheme,
99}
100config.color_scheme = 'mjaschen'
101
102config.colors = {
103 tab_bar = {
104 active_tab = {bg_color = '#ffffff', fg_color = '#e80da2'},
105 inactive_tab = {bg_color = '#cccccc', fg_color = '#444444'},
106 inactive_tab_hover = {bg_color = '#eeeeee', fg_color = '#222222'},
107 new_tab = {bg_color = '#cccccc', fg_color = '#111111'},
108 new_tab_hover = {bg_color = '#eeeeee', fg_color = '#111111'},
109 inactive_tab_edge = '#575757'
110 }
111}
112
113
114
115-- Keyboard
116
117config.keys = {
118
119 {
120 -- Make Option-Left equivalent to Alt-b which many line editors
121 -- interpret as backward-word
122 key = 'LeftArrow',
123 mods = 'OPT',
124 action = act.SendString '\x1bb'
125 }, {
126 -- Make Option-Right equivalent to Alt-f; forward-word
127 key = 'RightArrow',
128 mods = 'OPT',
129 action = act.SendString '\x1bf'
130 }, {
131 -- Split panes (right/left) with ⌘D
132 key = 'd',
133 mods = 'SUPER',
134 action = act.SplitHorizontal {domain = 'CurrentPaneDomain'}
135 }, {
136 -- Split panes (top/bottom) with ⌘⇧D
137 key = 'd',
138 mods = 'SUPER|SHIFT',
139 action = act.SplitVertical {domain = 'CurrentPaneDomain'}
140 }, {
141 -- Change to next pane with ⌘]
142 key = ']',
143 mods = 'SUPER',
144 action = act.ActivatePaneDirection('Next')
145 }, {
146 -- Change to previous pane with ⌘[
147 key = '[',
148 mods = 'SUPER',
149 action = act.ActivatePaneDirection('Prev')
150 }, {
151 -- Move Tab to the right with ⌘⇧-RightArrow
152 key = 'RightArrow',
153 mods = 'SUPER|SHIFT',
154 action = act.MoveTabRelative(1)
155 }, {
156 -- Move Tab to the left with ⌘⇧-LeftArrow
157 key = 'LeftArrow',
158 mods = 'SUPER|SHIFT',
159 action = act.MoveTabRelative(-1)
160 }, {
161 -- Clears the scrollback and viewport, and then sends CTRL-L to ask the
162 -- shell to redraw its prompt
163 key = 'k',
164 mods = 'SUPER',
165 action = act.Multiple {
166 act.ClearScrollback 'ScrollbackAndViewport',
167 act.SendKey {key = 'L', mods = 'CTRL'}
168 }
169 }, {
170 -- CMD-t open new tab in home directory
171 -- (default behavior: open new tab in current directory)
172 key = 't',
173 mods = 'CMD',
174 action = wezterm.action.SpawnCommandInNewTab {cwd = wezterm.home_dir}
175 }, {
176 -- Shift-Ctrl-Alt-k moves pane divider up
177 key = 'k',
178 mods = 'SHIFT|CTRL|ALT',
179 action = act.AdjustPaneSize {"Up", 3}
180 }, {
181 -- Shift-Ctrl-Alt-j moves pane divider down
182 key = 'j',
183 mods = 'SHIFT|CTRL|ALT',
184 action = act.AdjustPaneSize {"Down", 3}
185 }, {
186 -- Shift-Ctrl-Alt-h moves pane divider left
187 key = 'h',
188 mods = 'SHIFT|CTRL|ALT',
189 action = act.AdjustPaneSize {"Left", 3}
190 }, {
191 -- Shift-Ctrl-Alt-l moves pane divider right
192 key = 'l',
193 mods = 'SHIFT|CTRL|ALT',
194 action = act.AdjustPaneSize {"Right", 3}
195 }, {
196 -- Shift-Ctrl-Alt-z toggles zoom for current pane
197 key = 'z',
198 mods = 'SHIFT|CTRL|ALT',
199 action = act.TogglePaneZoomState
200 }
201
202}
203
204return config
205