# Change prefix key to Ctrl-f unbind C-b set -g prefix C-f # Move detach session bind from home row unbind d bind ` detach # Start numbering at 1 intead of 0 set -g base-index 1 set-window-option -g pane-base-index 1 # Last active window unbind l bind C-f last-window # Kill window bind C-k kill-window # Ensure the new window opens with the same path bind c new-window -c "#{pane_current_path}" # More straight forward key bindings for splitting unbind % bind \\ split-window -h -c "#{pane_current_path}" # '|' key sans shift unbind '"' bind - split-window -v -c "#{pane_current_path}" # '-' key sans shift # Pane # Make choosing the pane similar to vi navigation set-window-option -g mode-keys vi bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R ## Use the vi directions for resizing panes too bind H resize-pane -L 5 bind L resize-pane -R 5 bind K resize-pane -U 5 bind J resize-pane -D 5 # Copy mode unbind [ bind C-c copy-mode # Paste mode unbind ] bind C-v paste-buffer # move tmux copy buffer into x clipboard bind-key C-y save-buffer /tmp/tmux-buffer \; run-shell "cat /tmp/tmux-buffer | xclip" # Status Bar set -g status-bg black set -g status-fg white set -g status-interval 1 set -g status-left '#[fg=green]#H#[default]' set -g status-right "|#(echo $(python -c \"import socket;s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM);s.connect(('8.8.8.8', 80));print(s.getsockname()[0]);s.close()\"))| #[fg=blue,bold]%m-%d-%y #[fg=red,bold]--#[fg=white,bold]%I:%M:%S#[fg=red,bold]--#[default]" # Notifying if other windows has activities setw -g monitor-activity off set -g visual-activity off # Highlighting the active window in status bar set-window-option -g window-status-current-style bg=red # Clock setw -g clock-mode-colour red setw -g clock-mode-style 12 # History set -g history-limit 100000 # Bind '<' and '>' to zoom and unzoom. unbind > bind > new-window -d -n tmux-zoom \; swap-pane -s tmux-zoom.1 \; select-window -t tmux-zoom unbind < bind < last-window \; swap-pane -s tmux-zoom.1 \; kill-window -t tmux-zoom # Reload the config file bind r source-file ~/.tmux.conf if-shell "[[ `uname` == \"Darwin\" ]]" \ "set-option -g default-command 'reattach-to-user-namespace -l zsh'" bind R \ set -g renumber-windows on\; \ new-window\; kill-window\; \ set -g renumber-windows off\; \ display-message "Windows reordered..."