Last active
October 12, 2023 13:11
-
-
Save mjf/dcfdd6f1c8eadcd0623f2434a0c2192a to your computer and use it in GitHub Desktop.
tmux(1) synchronize panes toggling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g status-style 'bg=green fg=black' | |
set -g status-position top | |
set -g message-style 'bg=yellow fg=black' | |
set -g pane-border-status bottom | |
set -g pane-border-style 'bg=black fg=white dim' | |
set -g pane-active-border-style 'bg=black fg=cyan' | |
set -g pane-border-format "#{?pane_active,#[reverse],#[default]} #{pane_title} (#{pane_index}) " | |
bind z run-shell '\ | |
tmux show-options -w |grep -q "^synchronize-panes on$" && { \ | |
tmux set-option -w synchronize-panes off; \ | |
tmux set -g status-style "bg=green fg=black"; \ | |
tmux set -g pane-active-border-style "fg=cyan"; \ | |
} || { \ | |
tmux set-option -w synchronize-panes on; \ | |
tmux set -g status-style "bg=red fg=black"; \ | |
tmux set -g pane-active-border-style "fg=red"; \ | |
}' | |
# vi:ft=sh:nowrap: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment