In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
Select Basic. Select Long-Running Daemon
Give the script a decent name (I chose auto_dark_mode.py)
Save and open the script in your editor of choice.
| # remap prefix to Control + a | |
| set -g prefix C-a | |
| unbind C-b | |
| # quick pane cycling | |
| unbind ^A | |
| bind ^A select-pane -t :.+ | |
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' |