set -g default-command "zsh" set -g default-terminal "tmux-256color" set -g history-limit 20000 set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # automatically renumber tmux windows set -g renumber-windows on # something for nvim set -g focus-events on # unbind default prefix and set it to Ctrl+a unbind C-b set -g prefix C-a bind C-a send-prefix # for nested tmux sessions bind-key a send-prefix # Activity Monitoring setw -g monitor-activity off set -g visual-activity off # Rather than constraining window size to the maximum size of any client # connected to the *session*, constrain window size to the maximum size of any # client connected to *that window*. Much more reasonable. setw -g aggressive-resize on # make delay shorter set -sg escape-time 0 # tile all windows unbind = bind = select-layout tiled # cycle through panes # unbind C-a # unbind o # this is the default key for cycling panes # bind ^A select-pane -t:.+ set-option -g set-titles on set-option -g set-titles-string "#T - #W" set-window-option -g automatic-rename on ###################### #### Key Bindings #### ###################### # reload config file bind r source-file ~/.tmux.conf \; display "Config Reloaded!" # quickly open a new window bind N new-window -c "#{pane_current_path}" # split window and fix path for tmux 1.9 bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" # synchronize all panes in a window bind y setw synchronize-panes # pane movement shortcuts bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R bind -r C-h select-window -t :- bind -r C-l select-window -t :+ # Resize pane shortcuts bind -r H resize-pane -L 10 bind -r J resize-pane -D 10 bind -r K resize-pane -U 10 bind -r L resize-pane -R 10 # enable mouse support for switching panes/windows setw -g mouse on # set-option -g -q mouse on bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage" bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; send-keys -M" # maximizing and restoring windows unbind Up bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen unbind Down bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen # set vi mode for copy mode setw -g mode-keys vi # more settings to make copy-mode more vim-like unbind [ bind Escape copy-mode unbind p bind p paste-buffer # Buffers to/from Mac clipboard, yay tmux book from pragprog #bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" #bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" ############################## ### Color & Style Settings ### ############################## source ~/.dotfiles/tmux/theme.sh run-shell ~/git/build/tmux-yank/yank.tmux