wezterm config
This commit is contained in:
parent
a08934a1e3
commit
83d6e3f7cf
1 changed files with 57 additions and 0 deletions
57
.wezterm.lua
Normal file
57
.wezterm.lua
Normal file
|
@ -0,0 +1,57 @@
|
|||
-- Pull in the wezterm API
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
-- This will hold the configuration.
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
function scheme_for_appearance(appearance)
|
||||
if appearance:find 'Dark' then
|
||||
return 'Catppuccin Mocha'
|
||||
else
|
||||
return 'Catppuccin Latte'
|
||||
end
|
||||
end
|
||||
|
||||
local act = wezterm.action
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
config.keys = {
|
||||
{
|
||||
key = 'E',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = act.PromptInputLine {
|
||||
description = 'Enter new name for tab',
|
||||
action = wezterm.action_callback(function(window, pane, line)
|
||||
-- line will be `nil` if they hit escape without entering anything
|
||||
-- An empty string if they just hit enter
|
||||
-- Or the actual line of text they wrote
|
||||
if line then
|
||||
window:active_tab():set_title(line)
|
||||
end
|
||||
end),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
wezterm.on('window-config-reloaded', function(window, pane)
|
||||
local overrides = window:get_config_overrides() or {}
|
||||
local appearance = window:get_appearance()
|
||||
local scheme = scheme_for_appearance(appearance)
|
||||
if overrides.color_scheme ~= scheme then
|
||||
overrides.color_scheme = scheme
|
||||
window:set_config_overrides(overrides)
|
||||
end
|
||||
end)
|
||||
|
||||
-- This is where you actually apply your config choices
|
||||
|
||||
-- For example, changing the color scheme:
|
||||
-- config.color_scheme = 'AdventureTime'
|
||||
config.font = wezterm.font 'Victor Mono'
|
||||
config.window_background_opacity = 0.9
|
||||
config.macos_window_background_blur = 10
|
||||
config.use_fancy_tab_bar = false
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.window_decorations = "RESIZE"
|
||||
-- and finally, return the configuration to wezterm
|
||||
return config
|
Loading…
Add table
Add a link
Reference in a new issue