Created
May 10, 2021 00:42
-
-
Save andrenbrandao/701dc935b45666791183eb0948921bb7 to your computer and use it in GitHub Desktop.
This file contains 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 vi key bindings mode | |
set -g mode-keys vi | |
set -g status-keys vi | |
# Set new panes to open in current directory | |
bind c new-window -c "#{pane_current_path}" | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'dracula/tmux' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# Config Dracula Theme | |
set -g @dracula-show-fahrenheit false | |
set -g @dracula-show-powerline true | |
set -g @dracula-show-network false | |
set -g @dracula-show-left-icon session | |
set -g @dracula-cpu-usage true | |
set -g @dracula-ram-usage true | |
set -g @dracula-day-month true | |
set -g @dracula-military-time true | |
set -g @dracula-show-flags true | |
# Set 256 colors | |
set -s default-terminal 'tmux-256color' | |
# switch panes using Alt-arrow without prefix | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# swap windows with shift+arrow with prefix | |
bind-key S-Left swap-window -t -1 | |
bind-key S-Right swap-window -t +1 | |
# copy from tmux to clipboard | |
bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -r" \; display-message "Copied to selection" | |
bind-key -T copy-mode-vi Y send-keys -X copy-pipe "xclip -r -selection clipboard" \; display-message "Copied to clipboard" | |
bind-key C-p run-shell "xclip -o | tmux load-buffer - && tmux paste-buffer" | |
# turn mouse on | |
set -g mouse on | |
# restore vim sessions | |
set -g @resurrect-strategy-vim 'session' | |
# restore neovim sessions | |
set -g @resurrect-strategy-nvim 'session' | |
# restore panes | |
set -g @resurrect-capture-pane-contents 'on' | |
# restore last saved environment (automatically) | |
set -g @continuum-restore 'on' | |
# reload config file (change file location to your the tmux.conf you want to use) | |
bind r source-file ~/.tmux.conf | |
# Other examples: | |
# set -g @plugin 'github_username/plugin_name' | |
# set -g @plugin '[email protected]:user/plugin' | |
# set -g @plugin '[email protected]:user/plugin' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment