diff --git a/homes/notashelf/programs/terminal/emulators/wezterm/config.nix b/homes/notashelf/programs/terminal/emulators/wezterm/config.nix index e995903e1..e636f048b 100644 --- a/homes/notashelf/programs/terminal/emulators/wezterm/config.nix +++ b/homes/notashelf/programs/terminal/emulators/wezterm/config.nix @@ -1,21 +1,43 @@ -{colors}: -with colors; '' +{colors, ...}: +/* +lua +*/ +'' local wezterm = require("wezterm") local act = wezterm.action + -- wezterm.gui is not available to the mux server, so take care to + -- do something reasonable when this config is evaluated by the mux + function get_appearance() + if wezterm.gui then + return wezterm.gui.get_appearance() + end + return 'Dark' + end + + function scheme_for_appearance(appearance) + if appearance:find 'Dark' then + return 'Catppuccin Mocha' + else + return 'Catppuccin Latte' + end + end + return { check_for_updates = false, exit_behavior = "CloseOnCleanExit", - enable_scroll_bar = true, + enable_scroll_bar = false, font_size = 14.0, - font = wezterm.font 'Iosevka Nerd Font Mono' + font = wezterm.font 'Iosevka Nerd Font', + + color_scheme = scheme_for_appearance(get_appearance()), audible_bell = "Disabled", enable_tab_bar = true, hide_tab_bar_if_only_one_tab = true, - default_cursor_style = "SteadyUnderline", + default_cursor_style = "SteadyBar", window_background_opacity = 0.85, window_padding = { @@ -24,66 +46,5 @@ with colors; '' top = 16, bottom = 16, }, - - colors = { - background = "#${base00}", - cursor_bg = "#${base05}", - cursor_fg = "#${base00}", - cursor_border = "#${base05}", - foreground = "#${base05}", - selection_bg = "#${base05}", - selection_fg = "#${base00}", - - tab_bar = { - background = "#${base02}", - active_tab = { - bg_color = "#${base0D}", - fg_color = "#${base00}", - }, - - inactive_tab = { - bg_color = "#${base00}", - fg_color = "#${base08}", - }, - - inactive_tab_hover = { - bg_color = "#${base00}", - fg_color = "#${base0D}", - }, - - new_tab = { - bg_color = "#${base02}", - fg_color = "#${base08}", - }, - - new_tab_hover = { - bg_color = "#${base00}", - fg_color = "#${base0D}", - }, - }, - - - ansi = { - "#${base00}", - "#${base08}", - "#${base0B}", - "#${base0A}", - "#${base0D}", - "#${base0F}", - "#${base0C}", - "#${base05}" - }, - - brights = { - "#${base03}", - "#${base08}", - "#${base0B}", - "#${base0A}", - "#${base0D}", - "#${base0F}", - "#${base0C}", - "#${base07}" - }, - }, } ''