From 99f47469ec910b119c6bdd75c67239b9968d4cd0 Mon Sep 17 00:00:00 2001 From: Valentin Uveges Date: Mon, 27 Mar 2023 21:45:41 +0300 Subject: [PATCH 1/3] feat: make separator configurable --- README.md | 10 ++++++++++ catppuccin.tmux | 16 ++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 48e776d..36a2d67 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,16 @@ directory within the `status-right` and move the window names to the set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs ``` +##### Configure separator + +By default, the theme will use a round separator for left and right. +To overwrite it use `@catppuccin_left_separator` and `@catppuccin_right_separator` + +```sh +set -g @catppuccin_left_separator "█" +set -g @catppuccin_right_separator "█" +``` + [style-guide]: https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md ## 💝 Thanks to diff --git a/catppuccin.tmux b/catppuccin.tmux index b9ba7af..1f10385 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -61,25 +61,25 @@ main() { # --------=== Statusline # NOTE: Checking for the value of @catppuccin_window_tabs_enabled - local wt_enabled - wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" - readonly wt_enabled + readonly wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" + readonly right_separator="$(get-tmux-option "@catppuccin_right_separator" "")" + readonly left_separator="$(get-tmux-option "@catppuccin_left_separator" "")" # These variables are the defaults so that the setw and set calls are easier to parse. local show_directory - readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} #{?client_prefix,#[fg=$thm_red]" + readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} #{?client_prefix,#[fg=$thm_red]" local show_window - readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red]" + readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red]" local show_session - readonly show_session="#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S " + readonly show_session="#[fg=$thm_green]}#[bg=$thm_gray]$right_separator#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S " local show_directory_in_window_status readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} " local show_directory_in_window_status_current readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} " local show_window_in_window_status - readonly show_window_in_window_status="#[fg=$thm_fg,bg=$thm_bg] #W #[fg=$thm_bg,bg=$thm_blue] #I#[fg=$thm_blue,bg=$thm_bg]#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] " + readonly show_window_in_window_status="#[fg=$thm_fg,bg=$thm_bg] #W #[fg=$thm_bg,bg=$thm_blue] #I#[fg=$thm_blue,bg=$thm_bg]$left_separator#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] " local show_window_in_window_status_current - readonly show_window_in_window_status_current="#[fg=$thm_fg,bg=$thm_gray] #W #[fg=$thm_bg,bg=$thm_orange] #I#[fg=$thm_orange,bg=$thm_bg]#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] " + readonly show_window_in_window_status_current="#[fg=$thm_fg,bg=$thm_gray] #W #[fg=$thm_bg,bg=$thm_orange] #I#[fg=$thm_orange,bg=$thm_bg]$left_separator#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] " # Right column 1 by default shows the Window name. local right_column1=$show_window From fb801b0eb2edd882a058de76363320249b9f6fc5 Mon Sep 17 00:00:00 2001 From: Valentin Uveges Date: Mon, 27 Mar 2023 22:03:44 +0300 Subject: [PATCH 2/3] fix: update method name --- catppuccin.tmux | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/catppuccin.tmux b/catppuccin.tmux index 1f10385..fe2dc2e 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -61,9 +61,17 @@ main() { # --------=== Statusline # NOTE: Checking for the value of @catppuccin_window_tabs_enabled - readonly wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" - readonly right_separator="$(get-tmux-option "@catppuccin_right_separator" "")" - readonly left_separator="$(get-tmux-option "@catppuccin_left_separator" "")" + local wt_enabled + wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" + readonly wt_enabled + + local right_separator + right_separator="$(get_tmux_option "@catppuccin_right_separator" "")" + readonly right_separator + + local left_separator + left_separator="$(get_tmux_option "@catppuccin_left_separator" "")" + readonly left_separator # These variables are the defaults so that the setw and set calls are easier to parse. local show_directory From f3caea416e9a09a4493f2ec87b6af02731be03f0 Mon Sep 17 00:00:00 2001 From: Roger Steve Ruiz Date: Tue, 28 Mar 2023 01:08:58 -0400 Subject: [PATCH 3/3] Update catppuccin.tmux --- catppuccin.tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catppuccin.tmux b/catppuccin.tmux index fe2dc2e..185f090 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -61,7 +61,7 @@ main() { # --------=== Statusline # NOTE: Checking for the value of @catppuccin_window_tabs_enabled - local wt_enabled + local wt_enabled wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" readonly wt_enabled