From d588e25450762433790fc18be8f5197134c5b5cd Mon Sep 17 00:00:00 2001 From: MrSandman Date: Thu, 20 Jul 2023 00:08:29 +0200 Subject: [PATCH] feat: "hyper-focused" only-windows option --- readme.md | 1 + rose-pine.tmux | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 22458d8..6cf4d64 100644 --- a/readme.md +++ b/readme.md @@ -40,6 +40,7 @@ set -g @rose_pine_user 'on' # Turn on the username component in the statusbar set -g @rose_pine_window_tabs_enabled 'on' # When active, show program instead of current directory set -g @rose_pine_bar_bg_disabls 'on' # If set to 'on', disables background color, for transparent terminal emulators +set -g @rose_pine_only_windows 'on' # Leaves only the window module, for max focus and space # Example values for these can be: set -g @rose_pine_left_separator ' > ' # The strings to use as separators are 1-space padded diff --git a/rose-pine.tmux b/rose-pine.tmux index 409dbf0..7528b53 100755 --- a/rose-pine.tmux +++ b/rose-pine.tmux @@ -161,6 +161,11 @@ main() { local bar_bg_disable bar_bg_disable="$(get_tmux_option "@rose_pine_bar_bg_disable" "")" readonly bar_bg_disable + # + # Shows hostname of the computer the tmux session is run on + local only_windows + only_windows="$(get_tmux_option "@rose_pine_only_windows" "")" + readonly only_windows # Settings that allow user to choose their own icons and status bar behaviour # START @@ -188,15 +193,19 @@ main() { current_folder_icon="$(get_tmux_option "@rose_pine_folder_icon" "")" readonly current_folder_icon + # Changes the icon / character that goes between each window's name in the bar local window_status_separator window_status_separator="$(get_tmux_option "@rose_pine_window_status_separator" "  ")" + # This setting does nothing by itself, it enables the 2 below it to toggle the simplified bar local prioritize_windows prioritize_windows="$(get_tmux_option "@rose_pine_prioritize_windows" "")" + # Allows the user to set a min width at which most of the bar elements hide, or local user_window_width user_window_width="$(get_tmux_option "@rose_pine_width_to_hide" "")" + # A number of windows, when over it, the bar gets simplified local user_window_count user_window_count="$(get_tmux_option "@rose_pine_window_count" "")" @@ -329,12 +338,18 @@ main() { set status-right "$right_column" fi - if [[ $window_status_separator != "  " ]]; then + if [[ "$window_status_separator" != "  " ]]; then setw window-status-separator "$window_status_separator" else setw window-status-separator "  " fi + # Leaves only the window list on the left side + if [[ "$only_windows" == "on" ]]; then + set status-left "" + set status-right "" + fi + setw window-status-format "$window_status_format" setw window-status-current-format "$window_status_current_format"