Skip to content

Instantly share code, notes, and snippets.

@debajyoti-thetaonelab
Created July 22, 2017 15:43
Show Gist options
  • Select an option

  • Save debajyoti-thetaonelab/527a0c0e6d406b6dd87ae74134e5ea17 to your computer and use it in GitHub Desktop.

Select an option

Save debajyoti-thetaonelab/527a0c0e6d406b6dd87ae74134e5ea17 to your computer and use it in GitHub Desktop.
My tmux config file
# general
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g repeat-time 200
setw -g mode-keys emacs
set -g mouse on
set -g default-terminal "screen-256color-bce"
set -g escape-time 10
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
set-window-option -g window-status-current-format '#[fg=white,bold] *#{?window_zoomed_flag,#[fg=red](,}#{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-1 | rev)#{?window_zoomed_flag,#[fg=red]),}#[fg=white]|'
set-window-option -g window-status-format '#[fg=white]#{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-1 | rev) #[fg=white]|'
set -sg escape-time 0
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
bind | split-window -h
bind - split-window -v
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
#new window
unbind c
bind c new-window -c '#{pane_current_path}'
unbind '"'
bind '"' split-window -c '#{pane_current_path}'
unbind '%'
bind '%' split-window -h -c '#{pane_current_path}'
# switch to last pane
bind-key C-a last-pane
# Copy tmux buffer to xclipboard (
bind-key C-c run "tmux show-buffer | xsel -i -b"
# Paste from xclipboard
bind-key C-v run "xsel -o -b | tmux load-buffer - ; tmux paste-buffer"
# Show xclip content in gvim
bind-key V run "xsel -o -b | gvim -"
# move windows
bind-key -r ( swap-window -t -1
bind-key -r ) swap-window -t +1
set -g pane-border-fg white
set -g pane-active-border-fg cyan
set -g pane-active-border-bg cyan
set-option -g status-left-fg colour74
set-option -g status-style fg=colour136,bg=colour234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment