Skip to content

Commit

Permalink
feat: add window-list-alignment option
Browse files Browse the repository at this point in the history
You can now set the window lists alignment, available options are: left,
centre (default) and right

closes #19
  • Loading branch information
2KAbhishek committed Jul 29, 2024
1 parent 5810f28 commit 74c6c25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ To use plugins:
set -g @tmux2k-left-plugins "git cpu ram"
set -g @tmux2k-right-plugins "battery network time"

# to set window list alignment (centre by default)
set -g @tmux2k-window-list-alignment 'left'

# to customize plugin colors
set -g @tmux2k-[plugin-name]-colors "[background] [foreground]"
set -g @tmux2k-cpu-colors "red black" # set cpu plugin bg to red, fg to black
Expand Down
3 changes: 2 additions & 1 deletion scripts/tmux2k.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$current_dir"/utils.sh

show_powerline=$(get_tmux_option "@tmux2k-show-powerline" true)
window_list_alignment=$(get_tmux_option "@tmux2k-window-list-alignment" 'centre')
refresh_rate=$(get_tmux_option "@tmux2k-refresh-rate" 60)
start_icon=$(get_tmux_option "@tmux2k-start-icon" '')
l_sep=$(get_tmux_option "@tmux2k-left-sep")
Expand Down Expand Up @@ -177,7 +178,7 @@ set_options() {
tmux set-option -g pane-border-style "fg=${bg_main}"
tmux set-option -g message-style "bg=${bg_main},fg=${blue}"
tmux set-option -g status-style "bg=${bg_main},fg=${white}"
tmux set -g status-justify absolute-centre
tmux set -g status-justify "$window_list_alignment"

tmux set-window-option -g window-status-activity-style "bold"
tmux set-window-option -g window-status-bell-style "bold"
Expand Down

0 comments on commit 74c6c25

Please sign in to comment.