From d2a5c900212fa62970a79254b5c6c6a20052993e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 26 Mar 2024 11:51:35 -0500 Subject: [PATCH] WIP --- modules/home-manager/wezterm.nix | 18 ++++++++++++++++-- modules/home-manager/wezterm/config.lua | 15 ++++----------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/modules/home-manager/wezterm.nix b/modules/home-manager/wezterm.nix index fcd59c3..9fe8075 100644 --- a/modules/home-manager/wezterm.nix +++ b/modules/home-manager/wezterm.nix @@ -1,10 +1,24 @@ { + pkgs, # font, - # colors, + colors, ... }: { - programs.wezterm = { + programs.wezterm = with colors.withHashPrefix; { enable = true; extraConfig = builtins.readFile ./wezterm/config.lua; + colorSchemes = { + catppuccin-mocha-sapphire = { + ansi = map (x: colors.withHashPrefix.${toString x}) (pkgs.lib.lists.range 0 7); + brights = map (x: colors.withHashPrefix.${toString (x + 8)}) (pkgs.lib.lists.range 0 7); + + foreground = fg; + background = bg; + + cursor_fg = bg; + cursor_bg = text; + cursor_border = text; + }; + }; }; } diff --git a/modules/home-manager/wezterm/config.lua b/modules/home-manager/wezterm/config.lua index 622328b..010cc89 100644 --- a/modules/home-manager/wezterm/config.lua +++ b/modules/home-manager/wezterm/config.lua @@ -49,18 +49,11 @@ wezterm.on('format-tab-title', function (tab, _, _, _, _, max_width) return ' ' .. string.sub(title, 0, max_width - 2) .. ' ' end) ----@diagnostic disable-next-line: unused-local -local function scheme_for_appearance(appearance) - -- TODO: some way to detect if WM or something? - -- if appearance:find "Dark" then - -- return "Catppuccin Mocha" - -- else - -- return "Catppuccin Latte" - -- end - return "Catppuccin Mocha" -end +local colors, metadata = wezterm.color.load_scheme(wezterm.home_dir .. "/.config/wezterm/colors/catppuccin-mocha-sapphire.toml") +wezterm.colors = colors -config.color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()) +-- config.color_scheme_dirs = { '~/.config/wezterm/colors' } +-- config.color_scheme = 'catpuccin-mocha-sapphire'; config.inactive_pane_hsb = { saturation = 0.8,