Last active
August 7, 2024 02:06
-
-
Save markselby9/d9d5c0290ef6b82f4deb4b4682f94c62 to your computer and use it in GitHub Desktop.
.tmux.conf being used in my Macbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set the prefix from C-b to C-a | |
| set -g prefix C-a | |
| unbind C-b | |
| bind C-a send-prefix | |
| # Set the delay between prefix and command | |
| set -s escape-time 1 | |
| # Base index for windows and panes | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| # Reload configuration | |
| bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
| # Splitting panes | |
| bind | split-window -h | |
| bind - split-window -v | |
| # Moving between panes | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # Quick window selection | |
| bind -r C-h select-window -t :- | |
| bind -r C-l select-window -t :+ | |
| # Pane resizing | |
| bind -r H resize-pane -L 5 | |
| bind -r J resize-pane -D 5 | |
| bind -r K resize-pane -U 5 | |
| bind -r L resize-pane -R 5 | |
| # Mouse support | |
| set -g mouse off | |
| # Terminal settings | |
| set -g default-terminal "screen-256color" | |
| # Status line and window list colors | |
| set -g status-style fg=white,bg=black | |
| setw -g window-status-style fg=cyan,bg=black | |
| setw -g window-status-current-style fg=white,bold,bg=red | |
| # Pane borders and window styles | |
| setw -g pane-border-style fg=green | |
| setw -g pane-active-border-style fg=white,bg=yellow | |
| setw -g window-style fg=colour240,bg=colour235 | |
| setw -g window-active-style fg=white,bg=black | |
| # Command/message line | |
| set -g message-style fg=white,bold,bg=black | |
| # Status line customization | |
| set -g status-left-length 40 | |
| set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P" | |
| set -g status-right "#[fg=cyan]%d %b %R" | |
| set -g status-interval 60 | |
| set -g status-justify centre | |
| # Activity alerts | |
| setw -g monitor-activity on | |
| set -g visual-activity on | |
| # Vi mode for copy | |
| setw -g mode-keys vi | |
| bind Escape copy-mode | |
| bind-key -T copy-mode-vi v send -X begin-selection | |
| unbind p | |
| bind p paste-buffer | |
| # Clipboard integration (macOS) | |
| bind C-c run "tmux save-buffer - | pbcopy" | |
| bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" | |
| bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer" | |
| # Clipboard integration (Linux) | |
| # Uncomment below lines if you use Linux and have xclip installed | |
| # bind C-c run "tmux save-buffer - | xclip -selection clipboard" | |
| # bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard" | |
| # bind C-v run "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" | |
| # Kill server (safety binding) | |
| bind X kill-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment