-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.wezterm.lua
More file actions
307 lines (239 loc) · 7.81 KB
/
Copy path.wezterm.lua
File metadata and controls
307 lines (239 loc) · 7.81 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
local wezterm = require 'wezterm'
local act = wezterm.action
-- =========================================================
-- AUTO FULLSCREEN / MAXIMIZE ON STARTUP
-- =========================================================
wezterm.on('gui-startup', function(cmd)
local tab, pane, window = wezterm.mux.spawn_window(cmd or {})
window:gui_window():maximize()
end)
-- =========================================================
-- CONFIG
-- =========================================================
local config = wezterm.config_builder()
config.default_prog = { 'powershell.exe', '-NoLogo' }
-- =========================================================
-- GEMINI DARK PALETTE (Official Colors)
-- =========================================================
local GEMINI_BG = '#131314' -- پسزمینه اصلی جمینای
local GEMINI_SURFACE = '#1e1f20' -- پسزمینه کارتها و کدهای جمینای
local GEMINI_TAB_BAR = '#0e0e0f' -- نوار فوقانی تیره
local GEMINI_HOVER = '#282a2c' -- وضعیت هاور
local GEMINI_SELECTED = '#333538' -- رنگ سلکشن متن
local GEMINI_TEXT = '#e3e3e3' -- متن اصلی
local GEMINI_MUTED = '#8e918f' -- متن ثانویه
local GEMINI_ACCENT = '#7cacf8' -- آبی شاخص جمینای
local GEMINI_BORDER = '#2d2f31' -- خطوط جداکننده
-- =========================================================
-- COLORS
-- =========================================================
config.colors = {
background = GEMINI_BG,
foreground = GEMINI_TEXT,
cursor_bg = GEMINI_ACCENT,
cursor_fg = GEMINI_BG,
cursor_border = GEMINI_ACCENT,
selection_bg = GEMINI_SELECTED,
selection_fg = '#ffffff',
split = GEMINI_BORDER,
-- استایل مود کپی و انتخاب
copy_mode_active_highlight_bg = { Color = GEMINI_SURFACE },
copy_mode_active_highlight_fg = { Color = GEMINI_ACCENT },
copy_mode_inactive_highlight_bg = { Color = GEMINI_SURFACE },
copy_mode_inactive_highlight_fg = { Color = GEMINI_MUTED },
quick_select_label_bg = { Color = GEMINI_ACCENT },
quick_select_label_fg = { Color = GEMINI_BG },
quick_select_match_bg = { Color = GEMINI_SURFACE },
quick_select_match_fg = { Color = '#ffffff' },
-- =======================================================
-- ANSI
-- =======================================================
ansi = {
'#131314', '#f28b82', '#81c995', '#fdd663',
'#7cacf8', '#c58af9', '#78d9ec', '#e3e3e3',
},
-- =======================================================
-- BRIGHT ANSI
-- =======================================================
brights = {
'#5f6368', '#ee675c', '#5bb974', '#fcc934',
'#669df6', '#af5cf7', '#4ecde6', '#ffffff',
},
-- =======================================================
-- TAB BAR (پالت شیک و تفکیک شده جمینای)
-- =======================================================
tab_bar = {
background = GEMINI_TAB_BAR,
active_tab = {
bg_color = GEMINI_SURFACE,
fg_color = GEMINI_ACCENT,
intensity = 'Bold',
underline = 'None',
italic = false,
},
inactive_tab = {
bg_color = GEMINI_TAB_BAR,
fg_color = GEMINI_MUTED,
intensity = 'Normal',
underline = 'None',
italic = false,
},
inactive_tab_hover = {
bg_color = GEMINI_HOVER,
fg_color = GEMINI_TEXT,
intensity = 'Normal',
underline = 'None',
italic = false,
},
new_tab = {
bg_color = GEMINI_TAB_BAR,
fg_color = GEMINI_MUTED,
},
new_tab_hover = {
bg_color = GEMINI_HOVER,
fg_color = GEMINI_ACCENT,
},
},
}
-- =========================================================
-- WINDOW FRAME & TAB BAR STYLING
-- =========================================================
config.window_decorations = 'RESIZE'
config.use_fancy_tab_bar = true
config.tab_bar_at_bottom = false
config.enable_scroll_bar = false
config.window_background_opacity = 1.0
-- عرض کشیده تبها
config.tab_max_width = 56
-- اصلاح وزن فونت به DemiBold
config.window_frame = {
font = wezterm.font({ family = 'Fira Code', weight = 'DemiBold' }),
font_size = 15.0,
active_titlebar_bg = GEMINI_TAB_BAR,
inactive_titlebar_bg = GEMINI_TAB_BAR,
}
config.window_padding = {
left = 18,
right = 18,
top = 12,
bottom = 12,
}
config.hide_tab_bar_if_only_one_tab = false
-- =========================================================
-- FONT & BIDI
-- =========================================================
config.font = wezterm.font_with_fallback({
{
family = 'Fira Code',
weight = 'Regular',
harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1' },
},
{
family = 'Vazirmatn',
weight = 'Regular',
},
'Segoe UI Emoji',
})
config.font_size = 18.0
config.line_height = 1.25
config.bidi_direction = "LeftToRight"
config.bidi_enabled = true
-- =========================================================
-- KEYBOARD SHORTCUTS
-- =========================================================
config.keys = {
-- CTRL + V = پیست مستقیم کلیپبورد در خط فرمان و کادرهای متنی
{
key = 'v',
mods = 'CTRL',
action = act.PasteFrom 'Clipboard',
},
-- CTRL + C = کپی هوشمند (اگر متنی انتخاب شده باشد کپی میکند، وگرنه وقفه)
{
key = 'c',
mods = 'CTRL',
action = act.CopyTo 'ClipboardAndPrimarySelection',
},
-- CTRL + A = انتخاب کل محتوای صفحه و کپی فوری در کلیپبورد
{
key = 'a',
mods = 'CTRL',
action = wezterm.action_callback(function(window, pane)
local text = pane:get_lines_as_text(pane:get_dimensions().scrollback_rows)
if text and #text > 0 then
window:copy_to_clipboard(text)
end
end),
},
-- F10 = اجرای مستقیم LazyGit در همین تب و در همین پوشه فعال
{
key = 'F10',
mods = 'NONE',
action = act.SendString 'lazygit\r',
},
-- جابجایی تبها به چپ و راست (Shift + Alt + کلیدهای جهتی)
{
key = 'LeftArrow',
mods = 'SHIFT|ALT',
action = act.MoveTabRelative(-1),
},
{
key = 'RightArrow',
mods = 'SHIFT|ALT',
action = act.MoveTabRelative(1),
},
-- F12 = کپی مستقیم کل صفحه در کلیپبورد
{
key = 'F12',
action = wezterm.action_callback(function(window, pane)
local text = pane:get_lines_as_text(pane:get_dimensions().scrollback_rows)
if text and #text > 0 then
window:copy_to_clipboard(text)
end
end),
},
-- F11 & ALT+ENTER = فولاسکرین
{
key = 'F11',
action = act.ToggleFullScreen,
},
{
key = 'Enter',
mods = 'ALT',
action = act.ToggleFullScreen,
},
-- CTRL + T = تب جدید
{
key = 't',
mods = 'CTRL',
action = act.SpawnTab 'CurrentPaneDomain',
},
}
-- =========================================================
-- KEY TABLES
-- =========================================================
config.key_tables = {
copy_mode = {
{ key = 'Escape', action = act.CopyMode 'Close' },
{ key = 'q', action = act.CopyMode 'Close' },
},
search_mode = {
{ key = 'Escape', action = act.CopyMode 'Close' },
{ key = 'Enter', action = act.CopyMode 'PriorMatch' },
},
}
-- =========================================================
-- MOUSE BINDINGS
-- =========================================================
config.mouse_bindings = {
-- کلیک راست = پیست مستقیم کلیپبورد
{
event = { Down = { streak = 1, button = 'Right' } },
mods = 'NONE',
action = act.PasteFrom 'Clipboard',
},
}
-- =========================================================
-- FINAL
-- =========================================================
return config