Skip to content

Commit

Permalink
feat: "hyper-focused" only-windows option
Browse files Browse the repository at this point in the history
  • Loading branch information
mrs4ndman committed Jul 19, 2023
1 parent 70223de commit d588e25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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_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
Expand Down
17 changes: 16 additions & 1 deletion rose-pine.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" "")"

Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit d588e25

Please sign in to comment.