Skip to content

Instantly share code, notes, and snippets.

@jakab922
Created July 27, 2020 10:17
Show Gist options
  • Save jakab922/f814b79c52b02c3485f81265f4cfe783 to your computer and use it in GitHub Desktop.
Save jakab922/f814b79c52b02c3485f81265f4cfe783 to your computer and use it in GitHub Desktop.
My tmux config
# Package manager settings
set -g @plugin 'tmux-plugins/tpm'
# Installs themes
set -g @plugin 'jimeh/tmux-themepack'
# Selects a theme
set -g @themepack 'powerline/block/cyan'
# Add resurrect and continuum to save tmux sessions automatically
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Enable continuum
set -g @continuum-restore 'on'
# Change the prefix to C-s
set-option -g prefix C-s
# Turns on mouse support
set -g mouse on
# Setting up copy and paste
set-option -s set-clipboard off
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i -sel c"
bind-key -n C-y run "xclip -o -sel c | tmux load-buffer - ; tmux paste-buffer"
# Set emacs-like bindings
set -gw mode-keys emacs
# New binding for config reload
bind r source ~/.tmux.conf\; display "~/.tmux.conf sourced!"
# Add new keys for plane splitting
bind h split-window -h
bind v split-window -v
# Adding shortcut to kill other panes
unbind-key o
bind o kill-pane -a
# Shortcut for starting a new session
bind a command-prompt -I "" "new-session -s '%1'"
# Set the default shell to zsh
set -g default-shell /usr/bin/zsh
set -g default-command /usr/bin/zsh
# Starts the package manager
run '~/.tmux/plugins/tpm/tpm'
# Making tmux use 256 colors with xterm
set -g default-terminal "screen-256color"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment