Skip to content

Instantly share code, notes, and snippets.

@P7h
Last active March 7, 2017 02:26
Show Gist options
  • Save P7h/574e71a24b2d8ea22582 to your computer and use it in GitHub Desktop.
Save P7h/574e71a24b2d8ea22582 to your computer and use it in GitHub Desktop.
My tmux conf
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
"
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
# mouse
# (hold shift key down to copy text using mouse)
#set-option -g mouse on
set -g mouse-utf8 on
set -g mouse on
# interface
#------------
# pane
#------------
set -g pane-border-fg black
set -g pane-active-border-fg blue
#------------
# tabs
#------------
setw -g window-status-format "#[fg=white]#[bg=blue] #I #[bg=blue]#[fg=white] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=white] *#I #[fg=white,bold]#[bg=cyan] [#W] "
#setw -g window-status-content-attr bold,blink,reverse
#------------
# status bar
#------------
set-option -g status-position top
set -g status-fg white
set -g status-bg blue
set -g status-left ''
set -g status-right-length 40
set -g status-right '#(acpi | cut -d ',' -f 2) | %a %d-%m-%y %H:%M:%S'
#-----------------------------------------------------------------------------------------
# SSH Secure Shell does not show the border character properly. Hence overriding the char.
#-----------------------------------------------------------------------------------------
set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@'
#-----------------------------
# remap prefix to Control + a
#-----------------------------
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#-----------------------------------
# force a reload of the config file
#-----------------------------------
unbind r
bind r source-file ~/.tmux.conf
#-------------------
# quick pane cycling
#-------------------
unbind ^A
bind ^A select-pane -t :.+
#-----------------------------
# Install tmux plugin manager.
#-----------------------------
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#---------------------------
# Source the tmux conf file.
#---------------------------
tmux source-file ~/.tmux.conf
# Add the above .tmux.conf info and then launch a new tmux session and finally hit `prefix + I` [i.e. Ctrl b + I] to install the plugins.
# The plugins [in @tpm_plugins in .tmux.conf file] will be cloned to ~/.tmux/plugins/ dir and sourced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment