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?
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}"