lua highlitghing
This commit is contained in:
parent
747bda0f19
commit
9e61d2da2c
2 changed files with 64 additions and 62 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
editor = {
|
editor = {
|
||||||
|
file-picker.hidden = false;
|
||||||
idle-timeout = 0;
|
idle-timeout = 0;
|
||||||
line-number = "relative";
|
line-number = "relative";
|
||||||
cursor-shape = {
|
cursor-shape = {
|
||||||
|
|
|
||||||
|
|
@ -3,68 +3,69 @@
|
||||||
{
|
{
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = # lua
|
||||||
local act = wezterm.action
|
''
|
||||||
local function get_initial_cols_by_hostname()
|
local act = wezterm.action
|
||||||
local hostname = wezterm.hostname()
|
local function get_initial_cols_by_hostname()
|
||||||
if hostname == "rotterdam" then
|
local hostname = wezterm.hostname()
|
||||||
return 111
|
if hostname == "rotterdam" then
|
||||||
elseif hostname == "io" then
|
return 111
|
||||||
return 93
|
elseif hostname == "io" then
|
||||||
else
|
return 93
|
||||||
return 100
|
else
|
||||||
|
return 100
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
return {
|
||||||
return {
|
disable_default_key_bindings = true,
|
||||||
disable_default_key_bindings = true,
|
window_padding = {
|
||||||
window_padding = {
|
left = "2pt",
|
||||||
left = "2pt",
|
right = "2pt",
|
||||||
right = "2pt",
|
bottom = 0,
|
||||||
bottom = 0,
|
top = 0,
|
||||||
top = 0,
|
},
|
||||||
},
|
use_fancy_tab_bar = true,
|
||||||
use_fancy_tab_bar = true,
|
command_palette_font_size = 12,
|
||||||
command_palette_font_size = 12,
|
initial_cols = get_initial_cols_by_hostname(),
|
||||||
initial_cols = get_initial_cols_by_hostname(),
|
initial_rows = 32,
|
||||||
initial_rows = 32,
|
inactive_pane_hsb = {
|
||||||
inactive_pane_hsb = {
|
saturation = 0.7,
|
||||||
saturation = 0.7,
|
brightness = 0.5
|
||||||
brightness = 0.5
|
},
|
||||||
},
|
hide_tab_bar_if_only_one_tab = false,
|
||||||
hide_tab_bar_if_only_one_tab = false,
|
show_new_tab_button_in_tab_bar = true,
|
||||||
show_new_tab_button_in_tab_bar = true,
|
front_end = "WebGpu",
|
||||||
front_end = "WebGpu",
|
keys = {
|
||||||
keys = {
|
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) },
|
||||||
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) },
|
{ key = 'Tab', mods = 'SHIFT|CTRL', action = act.ActivateTabRelative(-1) },
|
||||||
{ key = 'Tab', mods = 'SHIFT|CTRL', action = act.ActivateTabRelative(-1) },
|
{ key = 'Enter', mods = 'ALT', action = act.ToggleFullScreen },
|
||||||
{ key = 'Enter', mods = 'ALT', action = act.ToggleFullScreen },
|
{ key = ':', mods = 'SHIFT|CTRL', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } },
|
||||||
{ key = ':', mods = 'SHIFT|CTRL', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } },
|
{ key = '?', mods = 'SHIFT|CTRL', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } },
|
||||||
{ key = '?', mods = 'SHIFT|CTRL', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } },
|
{ key = '+', mods = 'CTRL', action = act.IncreaseFontSize },
|
||||||
{ key = '+', mods = 'CTRL', action = act.IncreaseFontSize },
|
{ key = '=', mods = 'CTRL', action = act.IncreaseFontSize },
|
||||||
{ key = '=', mods = 'CTRL', action = act.IncreaseFontSize },
|
{ key = '-', mods = 'CTRL', action = act.DecreaseFontSize },
|
||||||
{ key = '-', mods = 'CTRL', action = act.DecreaseFontSize },
|
{ key = '_', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize },
|
||||||
{ key = '_', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize },
|
{ key = '0', mods = 'CTRL', action = act.ResetFontSize },
|
||||||
{ key = '0', mods = 'CTRL', action = act.ResetFontSize },
|
{ key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' },
|
||||||
{ key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' },
|
{ key = 'F', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' },
|
||||||
{ key = 'F', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' },
|
{ key = 'B', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' },
|
||||||
{ key = 'B', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' },
|
{ key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration },
|
||||||
{ key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration },
|
{ key = 'T', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' },
|
||||||
{ key = 'T', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' },
|
{ key = 'V', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' },
|
||||||
{ key = 'V', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' },
|
{ key = 'W', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } },
|
||||||
{ key = 'W', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } },
|
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) },
|
||||||
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) },
|
{ key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) },
|
||||||
{ key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) },
|
{ key = 'PageUp', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(-1) },
|
||||||
{ key = 'PageUp', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(-1) },
|
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) },
|
||||||
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) },
|
{ key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) },
|
||||||
{ key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) },
|
{ key = 'PageDown', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(1) },
|
||||||
{ key = 'PageDown', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(1) },
|
{ key = 'H', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Left' },
|
||||||
{ key = 'H', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Left' },
|
{ key = 'L', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Right' },
|
||||||
{ key = 'L', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Right' },
|
{ key = 'K', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Up' },
|
||||||
{ key = 'K', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Up' },
|
{ key = 'J', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Down' },
|
||||||
{ key = 'J', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Down' },
|
{ key = 'P', mods = 'SHIFT|CTRL', action = act.ActivateCommandPalette },
|
||||||
{ key = 'P', mods = 'SHIFT|CTRL', action = act.ActivateCommandPalette },
|
},
|
||||||
},
|
}
|
||||||
}
|
'';
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue