Skip to content

Instantly share code, notes, and snippets.

@Linell
Created July 14, 2020 16:41
Show Gist options
  • Save Linell/3880688477f838e010e5e21b4b0377e6 to your computer and use it in GitHub Desktop.
Save Linell/3880688477f838e010e5e21b4b0377e6 to your computer and use it in GitHub Desktop.
set-option -g status-keys vi
set-window-option -g mode-keys vi
set -g mouse on
set-option -g history-limit 10000
set -s escape-time 0
set -g aggressive-resize on
unbind ^X
bind ^X lock-server
unbind ^C
bind ^C new-window
unbind c
bind c new-window
unbind ^D
bind ^D detach
unbind *
bind * list-clients
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
unbind A
bind A command-prompt "rename window %%"
unbind ^A
bind ^A last-window
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
unbind ^W
bind ^W list-windows
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
unbind ^L
bind ^L refresh-client
unbind %
bind | split-window -h
bind \ split-window -h
bind v split-window -h
unbind '"'
bind - split-window -v
bind h split-window -v
unbind s
bind s select-pane -D
unbind w
bind w select-pane -U
unbind z
bind z select-pane -L
unbind x
bind x select-pane -R
bind-key B break-pane
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key J command-prompt -p "send pane to:" "join-pane -t '%%'"
unbind ^k
bind-key ^k resize-pane -U
unbind ^j
bind-key ^j resize-pane
unbind ^l
bind-key ^l resize-pane -R
unbind ^h
bind-key ^h resize-pane -L
bind-key W swap-pane -U
bind-key S swap-pane -D
bind-key Q select-pane -L
bind-key E select-pane -D
bind-key R select-pane -U
bind-key T select-pane -R
set-option -g set-titles on
set-option -g set-titles-string "tmux | #T (#I/#P)"
# Reload Config File
bind r source-file ~/.tmux.conf
# Enable Vi Mode
setw -g mode-keys vi
# Copy Mode
unbind [
bind-key Escape copy-mode
unbind [
bind-key P paste-buffer
bind-key -T vi-copy v begin-selection
bind-key -T vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Don't allow tmux to rename the window based on commands running
set-window-option -g allow-rename off
# Style Changes
set -g status-bg 'colour235'
set -g message-command-style fg='colour222',bg='colour238'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g pane-active-border-style fg='colour154'
set -g message-style fg='colour222',bg='colour238'
set -g status-right-length '100'
set -g pane-border-style fg='colour238'
setw -g window-status-style fg='colour121',bg='colour235'
setw -g window-status-activity-style fg='colour154',bg='colour235'
setw -g window-status-separator ''
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami)  #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r  %a  %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #H #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --battery --remaining --no-rgb) '
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I  #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I  #W  #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment