This is a bit of my tmux.conf
cat tmux.conf ... bind a set-window-option synchronize-panes on bind b set-window-option synchronize-panes off
As you can see, sync and unsync options for panes are bound to two different keys. Is it possible to toggle sync/unsync with the same key?
KEY BINDINGS. tmux may be controlled from an attached client by using a key combination of a prefix key, 'C-b' (Ctrl-b) by default, followed by a command key. The default command key bindings are: C-b Send the prefix key (C-b) through to the application. C-o Rotate the panes in the current window forwards.
Tmux uses the keybinding 'Prefix' followed by 'Ctrl+o' to cycle around the panes. When you use this key-binding for the first time, it moves the pane in one position clockwise.
The config file is located in /usr/share/tmux , not in /usr/share/doc/tmux .
If you don't explicitly specify "on" or "off", the option will get toggled. The following would suffice:
bind-key a set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With