dotfiles/dot_config/wezterm/executable_wezterm.lua.tmpl

188 lines
4.4 KiB
Cheetah
Raw Normal View History

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,
2023-12-27 02:25:06 +01:00
window_close_confirmation = 'NeverPrompt',
2023-02-17 16:41:55 +01:00
-- 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,
{{ if eq .chezmoi.os "darwin" }}
window_decorations = "TITLE | RESIZE",
{{ else if eq .chezmoi.os "linux" }}
{{- if eq .chezmoi.hostname "SpectreOS" -}}
window_decorations = "NONE",
{{- else if eq .chezmoi.hostname "simons-pi" -}}
window_decorations = "NONE",
{{- else -}}
window_decorations = "TITLE | RESIZE",
{{- end -}}
{{ end }}
2023-11-13 14:07:33 +01:00
tab_bar_at_bottom = false,
hide_tab_bar_if_only_one_tab = true,
2023-02-17 16:41:55 +01:00
use_fancy_tab_bar = false,
scrollback_lines = 999999,
enable_scroll_bar = false,
adjust_window_size_when_changing_font_size=false,
font = wezterm.font_with_fallback({"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
}