Skip to content

Instantly share code, notes, and snippets.

@HigorMonteiro
Created December 21, 2016 12:53
Show Gist options
  • Save HigorMonteiro/474943de8a7210a20150011377c9a971 to your computer and use it in GitHub Desktop.
Save HigorMonteiro/474943de8a7210a20150011377c9a971 to your computer and use it in GitHub Desktop.
# utf-8
set -g utf8
set-window-option -g utf8 on
# settings 256 colors
set -g default-terminal "screen-256color"
# Remove ctrl + b prefix and set it to ctrl + a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# setting delay to avoid interfering with vim
set -sg escape-time 1
# changing indexing, base 1
set-option -g base-index 1
setw -g pane-base-index 1
# add keybinding to reload .tmux file
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# send prefix to other applications
bind C-a send-prefix
# remap keybindings to split panes
bind | split-window -h
bind - split-window -v
# remap keybindings to navigate through panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# remap keybindings to resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# mouse
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# customizing status bar
set -g status-fg white
set -g status-bg black
# coloring
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg black
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# status bar
set -g status-utf8 on
set -g status-right "#[fg=cyan]#(/usr/local/bin/battery) #[fg=red]:: #[fg=cyan]%R #[fg=red]:: #[fg=cyan]%e/%m"
set -g status-left "[#S] #[fg=cyan]♬ #(/usr/local/bin/spotify-now-playing)"
set -g status-interval 10
set -g status-justify centre
setw -g automatic-rename off
set -g status-left-length 50
setw -g monitor-activity on
set -g visual-activity on
# enable vi mode on buffers
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"%xclip -o -sel clipboard\"; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment