Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save randywallace/abd6b9d2828dd519046bab2ea3b349ba to your computer and use it in GitHub Desktop.
Save randywallace/abd6b9d2828dd519046bab2ea3b349ba to your computer and use it in GitHub Desktop.
.tmux.conf v2.7.3
# Act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -R
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# Act like GNU Screen
unbind C-b
set -g prefix ^A
bind a send-prefix
unbind A
bind A command-prompt "rename-window %%"
unbind ^A
bind ^A last-window
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
#
# # Look good
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g automatic-rename off
set -g status-left ''
set -g status-interval 1
set -sg escape-time 0
set-option -g status-right-length 110
set-option -g status-left-length 60
set-option -g visual-activity on
#set-option -g visual-content on
set-window-option -g monitor-activity on
set-window-option -g automatic-rename off
set-option -g allow-rename off
## tmux window titling for X
set-option -g set-titles on
set-option -g set-titles-string '[#I] #W'
set-option -g base-index 1
## enable mouse
#set-option -g mouse-select-pane on
set-window-option -g mode-keys vi
#set-window-option -g mode-mouse on
# set-window-option -g monitor-activity off
# set-window-option -g monitor-content off
# set-option -g history-limit 4096
## pane border and colors
#set-option -g pane-active-border-fg yellow
#set-option -g pane-border-fg white
set -g pane-active-border-style fg=yellow
set -g pane-border-style fg=white
#TMUX POWERLINE
set-option -g status on
set-option -g status-interval 2
#set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 90
set-option -g status-right-length 90
#set-window-option -g status-left-fg black
#set-window-option -g status-left-bg white
set -g status-left-style fg=black,bg=white
set-window-option -g aggressive-resize on
set -g window-status-separator ''
set-option -g renumber-windows on
gruvbox_dark0_hard='#1d2021'
gruvbox_dark0='#282828'
gruvbox_dark0_soft='#32302f'
gruvbox_dark1='#3c3836'
gruvbox_dark2='#504945'
gruvbox_dark3='#665c54'
gruvbox_dark4='#7c6f64'
gruvbox_dark4_256='#7c6f64'
gruvbox_gray_245='#928374'
gruvbox_gray_244='#928374'
gruvbox_light0_hard='#f9f5d7'
gruvbox_light0='#fbf1c7'
gruvbox_light0_soft='#f2e5bc'
gruvbox_light1='#ebdbb2'
gruvbox_light2='#d5c4a1'
gruvbox_light3='#bdae93'
gruvbox_light4='#a89984'
gruvbox_light4_256='#a89984'
gruvbox_bright_red='#fb4934'
gruvbox_bright_green='#b8bb26'
gruvbox_bright_yellow='#fabd2f'
gruvbox_bright_blue='#83a598'
gruvbox_bright_purple='#d3869b'
gruvbox_bright_aqua='#8ec07c'
gruvbox_bright_orange='#fe8019'
gruvbox_neutral_red='#cc241d'
gruvbox_neutral_green='#98971a'
gruvbox_neutral_yellow='#d79921'
gruvbox_neutral_blue='#458588'
gruvbox_neutral_purple='#b16286'
gruvbox_neutral_aqua='#689d6a'
gruvbox_neutral_orange='#d65d0e'
gruvbox_faded_red='#9d0006'
gruvbox_faded_green='#79740e'
gruvbox_faded_yellow='#b57614'
gruvbox_faded_blue='#076678'
gruvbox_faded_purple='#8f3f71'
gruvbox_faded_aqua='#427b58'
gruvbox_faded_orange='#af3a03'
onedark_black="#282c34"
onedark_blue="#61afef"
onedark_yellow="#e5c07b"
onedark_red="#e06c75"
onedark_white="#aab2bf"
onedark_green="#98c379"
onedark_visual_grey="#3e4452"
onedark_comment_grey="#5c6370"
sep_bg=$gruvbox_dark2
stat_bg=$gruvbox_dark0
act_bg=$gruvbox_neutral_orange
act_fg=$gruvbox_dark0
bell_bg=$gruvbox_neutral_red
bell_fg=$gruvbox_dark0
win_bg=$gruvbox_dark2
win_fg=$gruvbox_light3
active_bg=$gruvbox_neutral_blue
active_fg=$gruvbox_dark0
last_win_bg=$gruvbox_light4
last_win_fg=$gruvbox_dark0
status_prefix_bg=$gruvbox_neutral_red
status_prefix_fg=$gruvbox_dark0
status_copy_mode_bg=$gruvbox_neutral_orange
status_copy_mode_fg=$gruvbox_dark0
powerline_character=''
powerline_separator=''
powerline_left=''
set -g status-bg $stat_bg
set -g status-fg $gruvbox_light1
# window_last_flag
first_window_format="#[fg=$stat_bg,bg=$sep_bg,noreverse]$powerline_character"
first_window='#{?#{==:#{window_index},1},#{first_window_format},}'
end_window_format="#[fg=$sep_bg,bg=$stat_bg]$powerline_character"
end_window='#{?#{==:#{window_index},#{session_windows}},#{end_window_format},}'
prev_window_format_first="#[bg=$last_win_bg,fg=$sep_bg]"
status_window_format_first="#[bg=$win_bg,fg=$sep_bg]"
prev_window_test_first="#{?window_last_flag,#{prev_window_format_first},#{status_window_format_first}}"
prev_window_format_mid="#[bg=$last_win_bg,fg=$last_win_fg]"
status_window_format="#[bg=$win_bg,fg=$win_fg]"
prev_window_test_mid="#{?window_last_flag,#{prev_window_format_mid},#{status_window_format}}"
prev_window_format_last="#[bg=$sep_bg,fg=$last_win_bg]"
status_window_format_last="#[bg=$sep_bg,fg=$win_bg]"
prev_window_test_last="#{?window_last_flag,#{prev_window_format_last},#{status_window_format_last}}"
active_window_format_first="#[bg=$act_bg,fg=$sep_bg]"
active_window_test_first="#{?window_activity_flag,#{active_window_format_first},}"
active_window_format="#[bg=$act_bg,fg=$act_fg]"
active_window_test="#{?window_activity_flag,#{active_window_format},}"
active_window_format_last="#[bg=$sep_bg,fg=$act_bg]"
active_window_test_last="#{?window_activity_flag,#{active_window_format_last},}"
bell_window_format_first="#[bg=$bell_bg,fg=$sep_bg]"
bell_window_test_first="#{?window_bell_flag,#{bell_window_format_first},}"
bell_window_format="#[bg=$bell_bg,fg=$bell_fg]"
bell_window_test="#{?window_bell_flag,#{bell_window_format},}"
bell_window_format_last="#[bg=$sep_bg,fg=$bell_bg]"
bell_window_test_last="#{?window_bell_flag,#{bell_window_format_last},}"
window_status_start="$prev_window_test_first$active_window_test_first$bell_window_test_first#[noreverse]$powerline_character"
window_status_mid="$prev_window_test_mid$active_window_test$bell_window_test#[noreverse] #I $powerline_separator #W "
window_status_end="$prev_window_test_last$active_window_test_last$bell_window_test_last#[nobold]$powerline_character"
set -g window-status-format "$first_window$window_status_start$window_status_mid$window_status_end$end_window"
current_status_start="#[fg=$sep_bg,bg=$active_bg]$powerline_character"
current_status_mid="#[fg=$active_fg,bg=$active_bg,noreverse,bold] #I $powerline_separator #W "
current_status_end="#[fg=$active_bg,bg=$sep_bg,nobold]$powerline_character"
set -g window-status-current-format "$first_window$current_status_start$current_status_mid$current_status_end$end_window"
set-option -g status-left " #S "
prefix_pressed_format_right="#[fg=$status_prefix_bg,bg=$status_prefix_fg,bold]$powerline_left#[fg=$status_prefix_fg,bg=$status_prefix_bg] COMMAND #[fg=$status_prefix_fg,bg=$status_prefix_bg]$powerline_left"
prefix_pressed_format_left="#[fg=$status_prefix_fg,bg=$status_prefix_bg,bold]$powerline_character#[fg=$status_prefix_fg,bg=$status_prefix_bg] COMMAND #[fg=$status_prefix_bg,bg=$status_prefix_fg]$powerline_character"
copy_mode_format_right="#[fg=$status_copy_mode_bg,bg=$status_copy_mode_fg,bold]$powerline_left#[fg=$status_copy_mode_fg,bg=$status_copy_mode_bg] COPY #[fg=$status_copy_mode_fg,bg=$status_copy_mode_bg]$powerline_left"
copy_mode_format_left="#[fg=$status_copy_mode_fg,bg=$status_copy_mode_bg,bold]$powerline_character#[fg=$status_copy_mode_fg,bg=$status_copy_mode_bg] COPY #[fg=$status_copy_mode_bg,bg=$status_copy_mode_fg]$powerline_character"
set-option -g status-right "#{?client_prefix,#{prefix_pressed_format_right},}#{?#{==:#{pane_mode},copy-mode},#{copy_mode_format_right},}"
set-option -g status-left "#{?#{==:#{pane_mode},copy-mode},#{copy_mode_format_left},}#{?client_prefix,#{prefix_pressed_format_left},}#[bg=$stat_bg,fg=$status_copy_mode_bg] #{session_name}"
set-option -g visual-activity off
set -g mouse on
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
run -b '~/.tmux/plugins/tpm/tpm'
set -g @override_copy_command 'clip.exe'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment