Skip to content

Commit

Permalink
feat: current window status toggle, mentioned in #14
Browse files Browse the repository at this point in the history
  • Loading branch information
mrs4ndman committed Aug 1, 2023
1 parent 52ded28 commit 2010903
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ set -g @rose_pine_user 'on' # Turn on the username component in the statusbar
set -g @rose_pine_bar_bg_disable '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
set -g @rose_pine_disable_active_window_menu 'on' # Disables the menu that shows the active window on the left

set -g @rose_pine_default_window_behavior 'on' # Forces tmux default window list behaviour
set -g @rose_pine_show_current_program 'on' # Forces tmux to show the current running program as window name
Expand Down
13 changes: 10 additions & 3 deletions rose-pine.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ main() {
local directory
directory="$(get_tmux_option "@rose_pine_directory" "")"

# WARN: Breaking changes here: Documentation needs to be updated
local disable_active_window_menu
disable_active_window_menu="$(get_tmux_option "@rose_pine_disable_active_window_menu" "")"

local show_current_program
show_current_program="$(get_tmux_option "@rose_pine_show_current_program" "")"
readonly show_current_program
Expand Down Expand Up @@ -301,7 +303,7 @@ main() {

# This if statement allows the bg colors to be null if the user decides so
# It sets the base colors for active / inactive, no matter the window appearence switcher choice
# TEST: This needs to be tested soon
# TEST: This needs to be tested further
if [[ "$bar_bg_disable" == "on" ]]; then
set status-style "fg=$thm_pine,bg=0"
show_window_in_window_status="#[fg=$thm_iris,bg=0]#I#[fg=$thm_iris,bg=0]$left_separator#[fg=$thm_iris,bg=0]#W"
Expand Down Expand Up @@ -348,7 +350,12 @@ main() {

set status-right "$right_column"

set status-left "$show_session$show_window"
if [[ "$disable_active_window_menu" == "on" ]]; then
set status-left "$show_session"
else
set status-left "$show_session$show_window"
fi


local current_window_count
current_window_count=$(tmux list-windows | wc -l)
Expand Down

0 comments on commit 2010903

Please sign in to comment.