Last active
May 9, 2022 14:56
-
-
Save cedmundo/846f955afd582f4ef5c81f5e7ebf6ad0 to your computer and use it in GitHub Desktop.
My personal configuration file for tmux
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
# zsh zsh zsh | |
set-option -g default-shell /bin/zsh | |
# remap prefix from 'C-b' to 'F1' | |
unbind C-b | |
set-option -g prefix F1 | |
bind-key F1 send-prefix | |
# split panes using F3 and F4 and F6 | |
bind F2 split-window -h -c '#{pane_current_path}' \; resize-pane -R 20 | |
bind F3 split-window -v -c '#{pane_current_path}' \; resize-pane -D 15 | |
bind F4 split-window -h -c '#{pane_current_path}' | |
bind F5 split-window -v -c '#{pane_current_path}' | |
unbind '"' | |
unbind % | |
# Pane resize | |
bind -n M-Left resize-pane -L 5 | |
bind -n M-Right resize-pane -R 5 | |
bind -n M-Up resize-pane -U 5 | |
bind -n M-Down resize-pane -D 5 | |
# Enable mouse mode (tmux 2.1 and above) | |
set -g mouse on | |
# don't rename windows automatically | |
set-option -g allow-rename off | |
# wanna move fast | |
set-window-option -g xterm-keys on | |
# custom selection mode | |
set-window-option -g mode-keys vi | |
unbind [ | |
bind F1 copy-mode | |
unbind p | |
bind p paste-buffer | |
bind-key -T copy-mode-vi 'v' send -X begin-selection | |
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace xclip" | |
# escape delay and repeat time to zero | |
set -sg escape-time 0 | |
set-option -g repeat-time 0 | |
# set buffer limit | |
set-option -g history-limit 900000 | |
# Something with the colors | |
set -g default-terminal screen-256color | |
# Dynamic titles | |
set -g set-titles on | |
# Clear screen | |
bind -n C-K send-keys "clear && tmux clear-history" \; send-keys "Enter" | |
# Active window | |
# set -g window-style 'fg=cyan,bg=colour234' | |
# set -g window-active-style 'fg=colour07,bg=black' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment