1
0
Fork 0

wezterm is cool

This commit is contained in:
Von Random 2022-09-06 11:12:33 +03:00
parent da30490b19
commit 212be32916

View file

@ -31,6 +31,11 @@ local themes = {
'PaulMillr', -- bright and clear 'PaulMillr', -- bright and clear
'PencilDark', -- very nice, matches PencilColors 'PencilDark', -- very nice, matches PencilColors
} }
local webinar_overrides = {
harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' },
color_scheme = 'PencilLight',
}
local theme_n = 0 local theme_n = 0
function switch_theme(number, window) function switch_theme(number, window)
theme_n = theme_n + number theme_n = theme_n + number
@ -38,35 +43,35 @@ function switch_theme(number, window)
if theme_n > #themes then theme_n = 1 end if theme_n > #themes then theme_n = 1 end
window:set_config_overrides { color_scheme = themes[theme_n] } window:set_config_overrides { color_scheme = themes[theme_n] }
end end
wt.on('update-right-status', function(window, pane)
local theme_info = string.format(
'%s %s ', wt.nerdfonts.fa_terminal,
window:effective_config().color_scheme
)
window:set_right_status(wt.format {{ Text = theme_info }})
end)
wt.on('prev-theme', function(window) switch_theme(-1, window) end) wt.on('prev-theme', function(window) switch_theme(-1, window) end)
wt.on('next-theme', function(window) switch_theme( 1, window) end) wt.on('next-theme', function(window) switch_theme( 1, window) end)
wt.on('reset-theme', function(window) window:set_config_overrides {} end) wt.on('reset-theme', function(window) window:set_config_overrides() end)
wt.on('light-theme', function(window) wt.on('webinar', function(window) window:set_config_overrides(webinar_overrides) end)
window:set_config_overrides {
harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' },
font_size = 16,
color_scheme = 'PencilLight',
}
end)
wt.on('query-theme', function(window)
overrides = window:get_config_overrides()
wt.log_info(overrides['color_scheme'])
end)
return { return {
font_size = 15, font_size = 15,
bold_brightens_ansi_colors = false,
use_resize_increments = true,
color_scheme = theme, color_scheme = theme,
cursor_blink_rate = 0,
check_for_updates = false,
use_resize_increments = true,
bold_brightens_ansi_colors = false,
window_padding = {
left = 0, right = 0, top = 0, bottom = 0,
},
keys = { keys = {
{ key = 'c', mods = 'META', action = wt.action.Copy }, { key = 'c', mods = 'META', action = wt.action.Copy },
{ key = 'v', mods = 'META', action = wt.action.Paste }, { key = 'v', mods = 'META', action = wt.action.Paste },
{ key = 'a', mods = 'META', action = wt.action.EmitEvent 'prev-theme' }, { key = 'a', mods = 'META', action = wt.action.EmitEvent 'prev-theme' },
{ key = 's', mods = 'META', action = wt.action.EmitEvent 'next-theme' }, { key = 's', mods = 'META', action = wt.action.EmitEvent 'next-theme' },
{ key = 'd', mods = 'META', action = wt.action.EmitEvent 'light-theme' }, { key = 'r', mods = 'META', action = wt.action.EmitEvent 'reset-theme' },
{ key = 'q', mods = 'META', action = wt.action.EmitEvent 'query-theme' }, { key = 'd', mods = 'META', action = wt.action.EmitEvent 'webinar' },
}, },
window_padding = {
left = 0, right = 0, top = 0, bottom = 0,
},
cursor_blink_rate = 0,
} }