From 323807700dc415ebcaeb6389e0b04ac6a44f2267 Mon Sep 17 00:00:00 2001 From: winston Date: Thu, 19 Oct 2023 07:22:30 +0200 Subject: [PATCH] chore(wezterm): config cleanup --- home/apps/wezterm/smartpadding.lua | 24 ------------------- home/apps/wezterm/theme.lua | 38 ------------------------------ home/apps/wezterm/wezterm.lua | 22 +++-------------- 3 files changed, 3 insertions(+), 81 deletions(-) delete mode 100644 home/apps/wezterm/smartpadding.lua delete mode 100644 home/apps/wezterm/theme.lua diff --git a/home/apps/wezterm/smartpadding.lua b/home/apps/wezterm/smartpadding.lua deleted file mode 100644 index d3bb4e7..0000000 --- a/home/apps/wezterm/smartpadding.lua +++ /dev/null @@ -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 diff --git a/home/apps/wezterm/theme.lua b/home/apps/wezterm/theme.lua deleted file mode 100644 index 3f9da87..0000000 --- a/home/apps/wezterm/theme.lua +++ /dev/null @@ -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 diff --git a/home/apps/wezterm/wezterm.lua b/home/apps/wezterm/wezterm.lua index fe81a41..9cd8470 100644 --- a/home/apps/wezterm/wezterm.lua +++ b/home/apps/wezterm/wezterm.lua @@ -1,38 +1,22 @@ ----@type wezterm local wezterm = require("wezterm") local c = wezterm.config_builder() require("keys").apply(c) -c.font = wezterm.font_with_fallback({ - "Berkeley Mono", - "Symbols Nerd Font", -}) --- window +c.font = wezterm.font_with_fallback({ "Berkeley Mono", "Symbols Nerd Font" }) c.window_decorations = "RESIZE" c.window_padding = { left = 0, right = 0, top = 0, bottom = 0 } --- dim unfocused panes -c.inactive_pane_hsb = { - saturation = 1.0, - brightness = 0.8, -} --- etc. +c.inactive_pane_hsb = { saturation = 1.0, brightness = 0.8 } c.adjust_window_size_when_changing_font_size = false c.audible_bell = "Disabled" c.clean_exit_codes = { 130 } c.default_cursor_style = "BlinkingBar" -c.launch_menu = { - { label = "Music player", args = { "ncmpcpp" } }, -} c.command_palette_font_size = 13.0 c.window_frame = { font_size = 13.0 } wezterm.plugin .require("https://github.com/catppuccin/wezterm") - .apply_to_config(c, { - sync = true, - sync_flavors = { light = "latte", dark = "mocha" }, - }) + .apply_to_config(c, { sync = true }) wezterm.plugin .require("https://github.com/nekowinston/wezterm-bar") .apply_to_config(c)