chore(wezterm): config cleanup
This commit is contained in:
parent
8d4637960c
commit
323807700d
3 changed files with 3 additions and 81 deletions
|
@ -1,24 +0,0 @@
|
||||||
---@type wezterm
|
|
||||||
local wezterm = require("wezterm")
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
M.apply_to_config = function(c)
|
|
||||||
local default_padding = c.window_padding
|
|
||||||
|
|
||||||
wezterm.on("smart-padding", function(window, pane)
|
|
||||||
if pane:is_alt_screen_active() then
|
|
||||||
window:set_config_overrides({
|
|
||||||
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
|
|
||||||
})
|
|
||||||
else
|
|
||||||
window:set_config_overrides({
|
|
||||||
window_padding = default_padding,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
wezterm.on("update-status", function(window, pane)
|
|
||||||
wezterm.emit("smart-padding", window, pane)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
return M
|
|
|
@ -1,38 +0,0 @@
|
||||||
---@type wezterm
|
|
||||||
local wezterm = require("wezterm")
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.scheme_for_appearance = function(appearance, theme)
|
|
||||||
if string.match(wezterm.target_triple, "linux") then
|
|
||||||
return theme.dark
|
|
||||||
end
|
|
||||||
if appearance:find("Dark") then
|
|
||||||
return theme.dark
|
|
||||||
else
|
|
||||||
return theme.light
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
M.get_custom_colorschemes = function()
|
|
||||||
local oledppuccin = wezterm.color.get_builtin_schemes()["Catppuccin Mocha"]
|
|
||||||
oledppuccin.background = "#000000"
|
|
||||||
oledppuccin.ansi[6] = "#cba6f7"
|
|
||||||
oledppuccin.tab_bar.background = "#040404"
|
|
||||||
oledppuccin.tab_bar.inactive_tab.bg_color = "#0f0f0f"
|
|
||||||
oledppuccin.tab_bar.new_tab.bg_color = "#080808"
|
|
||||||
|
|
||||||
return {
|
|
||||||
["Catppuccin Americano"] = oledppuccin,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
M.apply = function(c)
|
|
||||||
c.color_schemes = M.get_custom_colorschemes()
|
|
||||||
c.color_scheme = M.scheme_for_appearance(wezterm.gui.get_appearance(), {
|
|
||||||
dark = "Catppuccin Americano",
|
|
||||||
light = "Catppuccin Latte",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,38 +1,22 @@
|
||||||
---@type wezterm
|
|
||||||
local wezterm = require("wezterm")
|
local wezterm = require("wezterm")
|
||||||
local c = wezterm.config_builder()
|
local c = wezterm.config_builder()
|
||||||
|
|
||||||
require("keys").apply(c)
|
require("keys").apply(c)
|
||||||
|
|
||||||
c.font = wezterm.font_with_fallback({
|
c.font = wezterm.font_with_fallback({ "Berkeley Mono", "Symbols Nerd Font" })
|
||||||
"Berkeley Mono",
|
|
||||||
"Symbols Nerd Font",
|
|
||||||
})
|
|
||||||
-- window
|
|
||||||
c.window_decorations = "RESIZE"
|
c.window_decorations = "RESIZE"
|
||||||
c.window_padding = { left = 0, right = 0, top = 0, bottom = 0 }
|
c.window_padding = { left = 0, right = 0, top = 0, bottom = 0 }
|
||||||
-- dim unfocused panes
|
c.inactive_pane_hsb = { saturation = 1.0, brightness = 0.8 }
|
||||||
c.inactive_pane_hsb = {
|
|
||||||
saturation = 1.0,
|
|
||||||
brightness = 0.8,
|
|
||||||
}
|
|
||||||
-- etc.
|
|
||||||
c.adjust_window_size_when_changing_font_size = false
|
c.adjust_window_size_when_changing_font_size = false
|
||||||
c.audible_bell = "Disabled"
|
c.audible_bell = "Disabled"
|
||||||
c.clean_exit_codes = { 130 }
|
c.clean_exit_codes = { 130 }
|
||||||
c.default_cursor_style = "BlinkingBar"
|
c.default_cursor_style = "BlinkingBar"
|
||||||
c.launch_menu = {
|
|
||||||
{ label = "Music player", args = { "ncmpcpp" } },
|
|
||||||
}
|
|
||||||
c.command_palette_font_size = 13.0
|
c.command_palette_font_size = 13.0
|
||||||
c.window_frame = { font_size = 13.0 }
|
c.window_frame = { font_size = 13.0 }
|
||||||
|
|
||||||
wezterm.plugin
|
wezterm.plugin
|
||||||
.require("https://github.com/catppuccin/wezterm")
|
.require("https://github.com/catppuccin/wezterm")
|
||||||
.apply_to_config(c, {
|
.apply_to_config(c, { sync = true })
|
||||||
sync = true,
|
|
||||||
sync_flavors = { light = "latte", dark = "mocha" },
|
|
||||||
})
|
|
||||||
wezterm.plugin
|
wezterm.plugin
|
||||||
.require("https://github.com/nekowinston/wezterm-bar")
|
.require("https://github.com/nekowinston/wezterm-bar")
|
||||||
.apply_to_config(c)
|
.apply_to_config(c)
|
||||||
|
|
Loading…
Reference in a new issue