-
Notifications
You must be signed in to change notification settings - Fork 0
/
.wezterm.lua
92 lines (92 loc) · 2.23 KB
/
.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.default_domain = 'WSL:Ubuntu'
config.window_close_confirmation = 'NeverPrompt'
config.skip_close_confirmation_for_processes_named = {
'bash',
'sh',
'zsh',
'fish',
'tmux',
'nu',
'cmd.exe',
'pwsh.exe',
'powershell.exe',
'wsl.exe',
'wslhost.exe',
}
config.keys = {
{
key = 'c',
mods = 'CTRL',
action = wezterm.action_callback(function(window, pane)
selection_text = window:get_selection_text_for_pane(pane)
is_selection_active = string.len(selection_text) ~= 0
if is_selection_active then
window:perform_action(wezterm.action.CopyTo('ClipboardAndPrimarySelection'), pane)
else
window:perform_action(wezterm.action.SendKey{ key='c', mods='CTRL' }, pane)
end
end),
},
{
key = 'v',
mods = 'CTRL',
action = wezterm.action { PasteFrom = 'Clipboard' }
},
{
key = 'q',
mods = 'CTRL',
action = wezterm.action.QuitApplication
},
-- Close current pane without confirmation
{
key = 'w',
mods = 'CTRL|SHIFT',
action = wezterm.action.CloseCurrentPane { confirm = false },
},
-- This will create a new split and run your default program inside it
{
key = '_',
mods = 'SHIFT|ALT',
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
{
key = '+',
mods = 'SHIFT|ALT',
action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
},
{
key = 'LeftArrow',
mods = 'SHIFT|ALT',
action = wezterm.action.ActivatePaneDirection 'Left',
},
{
key = 'RightArrow',
mods = 'SHIFT|ALT',
action = wezterm.action.ActivatePaneDirection 'Right',
},
{
key = 'UpArrow',
mods = 'SHIFT|ALT',
action = wezterm.action.ActivatePaneDirection 'Up',
},
{
key = 'DownArrow',
mods = 'SHIFT|ALT',
action = wezterm.action.ActivatePaneDirection 'Down',
},
}
config.font_size = 15.0
config.bold_brightens_ansi_colors = "BrightAndBold"
config.window_decorations = "RESIZE"
config.foreground_text_hsb = {
hue = 1.0,
saturation = 1.1,
brightness = 1.5,
}
config.inactive_pane_hsb = {
saturation = 0.75,
brightness = 0.5,
}
return config