2023-02-17 16:41:55 +01:00
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
local act = wezterm.action
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-02-17 16:41:55 +01:00
|
|
|
mb = {
|
2023-01-30 14:28:59 +01:00
|
|
|
}
|
|
|
|
|
2023-02-17 16:41:55 +01:00
|
|
|
for i = 1,99,1
|
|
|
|
do
|
|
|
|
table.insert(mb,
|
|
|
|
{
|
|
|
|
event = { Down = { streak = i, button = 'Middle' } },
|
|
|
|
mods = 'NONE',
|
|
|
|
action = act.PasteFrom("PrimarySelection")
|
|
|
|
})
|
|
|
|
table.insert(mb, {
|
|
|
|
event = { Down = { streak = i, button = 'Right' } },
|
|
|
|
mods = 'NONE',
|
|
|
|
action = wezterm.action_callback(function(window, pane)
|
|
|
|
local has_selection = window:get_selection_text_for_pane(pane) ~= ''
|
|
|
|
if has_selection then
|
|
|
|
window:perform_action(
|
|
|
|
act.CopyTo 'ClipboardAndPrimarySelection',
|
|
|
|
pane
|
|
|
|
)
|
|
|
|
|
|
|
|
window:perform_action(act.ClearSelection, pane)
|
|
|
|
else
|
|
|
|
window:perform_action(act.PasteFrom("PrimarySelection"), pane)
|
|
|
|
end
|
|
|
|
end),
|
|
|
|
})
|
|
|
|
end
|
2023-01-30 14:28:59 +01:00
|
|
|
|
|
|
|
return {
|
2023-02-17 16:41:55 +01:00
|
|
|
pane_focus_follows_mouse = false,
|
|
|
|
mouse_bindings = mb,
|
|
|
|
-- leader = { key = 'VoidSymbol', timeout_milliseconds = 1000 },
|
|
|
|
keys = {
|
|
|
|
-- {
|
|
|
|
-- key = 'c',
|
|
|
|
-- mods = 'CTRL|SHIFT',
|
|
|
|
-- action = wezterm.action.SpawnCommandInNewTab {
|
|
|
|
-- args = { 'zsh' },
|
|
|
|
-- cwd = '~'
|
|
|
|
-- },
|
|
|
|
-- },
|
|
|
|
{
|
|
|
|
key = 't',
|
|
|
|
mods = 'CTRL|SHIFT',
|
|
|
|
action = wezterm.action.SpawnCommandInNewTab {
|
|
|
|
args = { 'zsh' },
|
|
|
|
cwd = '~'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = 'f',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = wezterm.action.TogglePaneZoomState,
|
|
|
|
},
|
|
|
|
-- {
|
|
|
|
-- key = 'p',
|
|
|
|
-- mods = 'LEADER',
|
|
|
|
-- action = act.ActivateTabRelative(-1),
|
|
|
|
-- },
|
|
|
|
-- {
|
|
|
|
-- key = 'n',
|
|
|
|
-- mods = 'LEADER',
|
|
|
|
-- action = act.ActivateTabRelative(1),
|
|
|
|
-- },
|
|
|
|
{
|
|
|
|
key = 'LeftArrow',
|
|
|
|
mods = 'CTRL|SHIFT',
|
|
|
|
action = act.ActivateTabRelative(-1),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = 'RightArrow',
|
|
|
|
mods = 'CTRL|SHIFT',
|
|
|
|
action = act.ActivateTabRelative(1),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = '2',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = '2',
|
|
|
|
mods = 'LEADER',
|
|
|
|
action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = '5',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = '5',
|
|
|
|
mods = 'LEADER',
|
|
|
|
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = 'LeftArrow',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = act.ActivatePaneDirection 'Left',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = 'RightArrow',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = act.ActivatePaneDirection 'Right',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key = 'UpArrow',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = act.ActivatePaneDirection 'Up',
|
2023-01-30 14:28:59 +01:00
|
|
|
},
|
2023-02-17 16:41:55 +01:00
|
|
|
{
|
|
|
|
key = 'DownArrow',
|
|
|
|
mods = 'CTRL',
|
|
|
|
action = act.ActivatePaneDirection 'Down',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
window_padding = {
|
|
|
|
left = 2,
|
|
|
|
right = 2,
|
|
|
|
top = 0,
|
|
|
|
bottom = 0,
|
|
|
|
},
|
|
|
|
window_frame = {
|
|
|
|
border_left_width = '0.5cell',
|
|
|
|
border_right_width = '0.5cell',
|
|
|
|
},
|
|
|
|
window_background_opacity = 0.97,
|
2023-08-27 19:43:12 +02:00
|
|
|
{{ if eq .chezmoi.os "darwin" -}}
|
|
|
|
window_decorations = "TITLE | RESIZE",
|
|
|
|
{{ else if eq .chezmoi.os "linux" -}}
|
2023-09-12 14:02:22 +02:00
|
|
|
{{ if eq .chezmoi.hostname "brothertec" -}}
|
2023-08-27 19:43:12 +02:00
|
|
|
window_decorations = "NONE",
|
2023-09-12 14:02:22 +02:00
|
|
|
{{ else -}}
|
|
|
|
window_decorations = "TITLE | RESIZE",
|
|
|
|
{{ end -}}
|
2023-08-27 19:43:12 +02:00
|
|
|
{{ end -}}
|
2023-02-17 16:41:55 +01:00
|
|
|
tab_bar_at_bottom = true,
|
|
|
|
hide_tab_bar_if_only_one_tab = false,
|
|
|
|
use_fancy_tab_bar = false,
|
|
|
|
scrollback_lines = 999999,
|
|
|
|
enable_scroll_bar = false,
|
|
|
|
adjust_window_size_when_changing_font_size=false,
|
2023-08-27 20:06:27 +02:00
|
|
|
font = wezterm.font_with_fallback({"Hack Nerd Font", "Hack", "JetBrains Mono", "Twemoji"}),
|
2023-02-17 16:41:55 +01:00
|
|
|
font_size = 15,
|
|
|
|
force_reverse_video_cursor = false,
|
|
|
|
colors = {
|
|
|
|
ansi = {
|
|
|
|
'#1d1f21',
|
|
|
|
'#cc6666',
|
|
|
|
'#b5bd68',
|
|
|
|
'#f0c674',
|
|
|
|
'#81a2be',
|
|
|
|
'#b294bb',
|
|
|
|
'#8abeb7',
|
|
|
|
'#c5c8c6'
|
2023-01-30 14:28:59 +01:00
|
|
|
},
|
2023-02-17 16:41:55 +01:00
|
|
|
background = '#1d1f21',
|
|
|
|
brights = {
|
|
|
|
'#969896',
|
|
|
|
'#cc6666',
|
|
|
|
'#b5bd68',
|
|
|
|
'#f0c674',
|
|
|
|
'#81a2be',
|
|
|
|
'#b294bb',
|
|
|
|
'#8abeb7',
|
|
|
|
'#ffffff'
|
2023-01-30 14:28:59 +01:00
|
|
|
},
|
2023-02-17 16:41:55 +01:00
|
|
|
foreground = '#c5c8c6',
|
|
|
|
selection_bg = '#373b41',
|
|
|
|
selection_fg = '#c5c8c6',
|
|
|
|
cursor_bg = '#c5c8c6',
|
|
|
|
cursor_border = '#c5c8c6',
|
|
|
|
cursor_fg = '#1d1f21',
|
|
|
|
},
|
|
|
|
-- color_scheme = 'Catppuccin Macchiato',
|
|
|
|
-- default_cursor_style = 'BlinkingBlock',
|
|
|
|
-- cursor_blink_rate = 500,
|
|
|
|
-- animation_fps = 100,
|
|
|
|
-- front_end = "Software",
|
2023-01-30 14:28:59 +01:00
|
|
|
}
|