My current setup for my tmux.
      set-option -g default-shell "${SHELL}"
      set-option -g default-command "reattach-to-user-namespace -l ${SHELL}"
      # to fix pdcopy pdpaste in tmux
      #set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
      # Tmux should be pretty, we need 256 color for that
      set -g default-terminal "screen-256color"
      # Tmux uses a 'control key', let's set it to 'Ctrl-a'
      # Reason: 'Ctrl-a' is easier to reach than 'Ctrl-b'
      # set -g prefix C-a
      # unbind C-b
      # command delay? We don't want that, make it short
      set -sg escape-time 1
      # Set the numbering of windows to go from 1 instead
      # of 0 - silly programmers :|
      set-option -g base-index 1
      setw -g pane-base-index 1
      # Allow us to reload our Tmux configuration while
      # using Tmux
      bind r source-file ~/.tmux.conf \; display "Reloaded!"
      # Getting interesting now, we use the vertical and horizontal
      # symbols to split the screen
      bind | split-window -h
      bind - split-window -v
      # use vi style navigation
      setw -g mode-keys vi
      set -g status-keys vi
      # bind-key -t vi-edit Up   history-up
      # bind-key -t vi-edit Down history-down
      # Smart pane switching with awareness of vim splits
      # See:
      is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
      bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
      bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
      bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
      bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
      bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
      # enabled trackpad scrolling
      set -g mouse on
      # copy to macOS clipboard
      bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
      bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"