From ab077f659c9ed5f359c4eeb7f56bab8fc8a15596 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 20 Sep 2024 19:49:55 -0300 Subject: [PATCH] new wezterm tabs --- users/common/programs.nix | 1 - users/desktops/common/programs/wezterm.nix | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/users/common/programs.nix b/users/common/programs.nix index e144a9a..f74d4c6 100644 --- a/users/common/programs.nix +++ b/users/common/programs.nix @@ -21,7 +21,6 @@ insert = "bar"; select = "underline"; }; - mouse = false; soft-wrap.enable = true; auto-format = true; indent-guides.render = true; diff --git a/users/desktops/common/programs/wezterm.nix b/users/desktops/common/programs/wezterm.nix index 07bd16f..2e2e677 100644 --- a/users/desktops/common/programs/wezterm.nix +++ b/users/desktops/common/programs/wezterm.nix @@ -17,9 +17,21 @@ end end wezterm.on('format-tab-title', function(tab, tabs, panes, config, hover, max_width) - -- Tab indices are 0-based, so add 1 + local left_sep = "" + local right_sep = "" + -- Define the tab title format using the Powerline separator local tab_index = tab.tab_index + 1 - return " :" .. tab_index .. ": " + return { + { Background = { Color = "${config.lib.stylix.colors.withHashtag.base01}" } }, + { Foreground = { Color = tab.is_active and "${config.lib.stylix.colors.withHashtag.base04}" or "${config.lib.stylix.colors.withHashtag.base01}" } }, + { Text = left_sep }, + { Background = { Color = tab.is_active and "${config.lib.stylix.colors.withHashtag.base04}" or "${config.lib.stylix.colors.withHashtag.base01}" } }, + { Foreground = { Color = "${config.lib.stylix.colors.withHashtag.base05}" } }, + { Text = " " .. tab_index .. " " }, + { Background = { Color = "${config.lib.stylix.colors.withHashtag.base01}" } }, + { Foreground = { Color = tab.is_active and "${config.lib.stylix.colors.withHashtag.base04}" or "${config.lib.stylix.colors.withHashtag.base01}" } }, + { Text = right_sep }, + } end) wezterm.on('update-right-status', function(window, pane) -- Each element holds the text for a cell in a "powerline" style << fade