Last active
April 20, 2020 20:51
-
-
Save dpo/cdfe307b46cb318d6382936a4e55ad4e to your computer and use it in GitHub Desktop.
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 -g prefix Home | |
unbind C-b | |
bind-key Home send-prefix # Caps-Lock is remapped to Home | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
# tmux-resurrect and tmux-continuum to save the state across system restarts | |
# prefix-Ctrl-s to save the state | |
# prefix-Ctrl-r to restore the state | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# tmux-yank: Copy to the system clipboard in tmux | |
# begin copying with Leader + ] V, end with ENTER | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
# tmux-cpu: Enables displaying CPU and GPU information in Tmux status-right and status-left | |
set -g @plugin 'tmux-plugins/tmux-cpu' | |
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M ' | |
# local customizations | |
set -g mouse off | |
set -g base-index 1 # number windows starting from 1 instead of 0 | |
setw -g pane-base-index 1 # number panes starting from 1 instead of 0 | |
bind-key M split-window -h "vim ~/.tmux.conf" | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" # reload this config file with prefix-r | |
bind | split-window -h # more intuitive characters to split a window into panes | |
bind - split-window -v | |
setw -g mode-keys vi | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
unbind n | |
bind < previous-window # use prefix-< and prefix-> to cycle through windows | |
bind > next-window | |
# enable true colors so tmux and terminal colors match | |
# https://github.com/tmux/tmux/issues/1246#issuecomment-493454336 | |
set -g default-terminal "xterm-256color" | |
set -ga terminal-overrides ",*256col*:Tc" | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
if "test ! -d ~/.tmux/plugins/tpm" \ | |
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment