Skip to content

Instantly share code, notes, and snippets.

@andresanches
Last active December 9, 2020 22:17
Show Gist options
  • Save andresanches/fd0ce394f836c3f0dd98919254e2db4c to your computer and use it in GitHub Desktop.
Save andresanches/fd0ce394f836c3f0dd98919254e2db4c to your computer and use it in GitHub Desktop.
#set-option -g prefix M-b
setw -g mode-keys vi
setw -g mouse on
set -g pane-border-status top
set-option -g history-limit 5000
bind-key -T prefix C-s setw synchronize-pane
bind t command-prompt -p "(rename-pane)" -I "#T" "select-pane -T '%%'"
set -g base-index 1
# Emulate scrolling by sending up and down keys if these commands are running in the pane
tmux_commands_with_legacy_scroll="nano less more man git"
bind-key -T root WheelUpPane \
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
'send -Mt=' \
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
"send -t= Up" "copy-mode -et="'
bind-key -T root WheelDownPane \
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
'send -Mt=' \
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
"send -t= Down" "send -Mt="'
######################
### DESIGN CHANGES ###
######################
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# modes
setw -g clock-mode-colour colour5
setw -g mode-style fg=colour1,bg=colour18,bold
# panes
set -g pane-border-style fg=colour8,bg=colour0
set -g pane-active-border-style fg=colour15,bg=colour0
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style fg=colour137,bg=colour18,dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style fg=colour1,bg=colour19,bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style fg=colour9,bg=colour18,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
# messages
#set -g message-style fg=colour232,bg=colour16,bold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment