wezterm is cool
This commit is contained in:
parent
da30490b19
commit
212be32916
1 changed files with 25 additions and 20 deletions
45
wezterm.lua
45
wezterm.lua
|
@ -31,6 +31,11 @@ local themes = {
|
|||
'PaulMillr', -- bright and clear
|
||||
'PencilDark', -- very nice, matches PencilColors
|
||||
}
|
||||
local webinar_overrides = {
|
||||
harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' },
|
||||
color_scheme = 'PencilLight',
|
||||
}
|
||||
|
||||
local theme_n = 0
|
||||
function switch_theme(number, window)
|
||||
theme_n = theme_n + number
|
||||
|
@ -38,35 +43,35 @@ function switch_theme(number, window)
|
|||
if theme_n > #themes then theme_n = 1 end
|
||||
window:set_config_overrides { color_scheme = themes[theme_n] }
|
||||
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('next-theme', function(window) switch_theme( 1, window) end)
|
||||
wt.on('reset-theme', function(window) window:set_config_overrides {} end)
|
||||
wt.on('light-theme', function(window)
|
||||
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)
|
||||
wt.on('reset-theme', function(window) window:set_config_overrides() end)
|
||||
wt.on('webinar', function(window) window:set_config_overrides(webinar_overrides) end)
|
||||
|
||||
return {
|
||||
font_size = 15,
|
||||
bold_brightens_ansi_colors = false,
|
||||
use_resize_increments = true,
|
||||
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 = {
|
||||
{ key = 'c', mods = 'META', action = wt.action.Copy },
|
||||
{ key = 'v', mods = 'META', action = wt.action.Paste },
|
||||
{ key = 'a', mods = 'META', action = wt.action.EmitEvent 'prev-theme' },
|
||||
{ key = 's', mods = 'META', action = wt.action.EmitEvent 'next-theme' },
|
||||
{ key = 'd', mods = 'META', action = wt.action.EmitEvent 'light-theme' },
|
||||
{ key = 'q', mods = 'META', action = wt.action.EmitEvent 'query-theme' },
|
||||
{ key = 'r', mods = 'META', action = wt.action.EmitEvent 'reset-theme' },
|
||||
{ key = 'd', mods = 'META', action = wt.action.EmitEvent 'webinar' },
|
||||
},
|
||||
window_padding = {
|
||||
left = 0, right = 0, top = 0, bottom = 0,
|
||||
},
|
||||
cursor_blink_rate = 0,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue