Skip to content

Instantly share code, notes, and snippets.

@annacruz
Created January 25, 2022 11:07
Show Gist options
  • Save annacruz/953dd3706cab7bf409eb37310c49c9f9 to your computer and use it in GitHub Desktop.
Save annacruz/953dd3706cab7bf409eb37310c49c9f9 to your computer and use it in GitHub Desktop.
A tmux configuration
# vi for the win
set-window-option -g mode-keys vi
# enable mouse
set-option -g mouse on
# set-option -s set-clipboard off
# bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -se c -i"
bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-word \; \
run-shell "sleep .5s" \; \
send-keys -X copy-selection-and-cancel\; run "tmux save-buffer - | pbcopy"
unbind -Tcopy-mode-vi Enter
bind -Tcopy-mode-vi Enter send -X copy-selection-and-cancel\; run "tmux save-buffer - | pbcopy"
# setup colors and tmux icon
tm_icon="♥️ "
tm_color_active=colour39
tm_color_inactive=colour24
tm_color_feature=colour198
tm_active_border_color=colour39
set -g default-terminal "tmux-256color"
# separators
tm_separator_left_bold="‚óÄ"
tm_separator_left_thin="‚ùÆ"
tm_separator_right_bold="‚ñ∂"
tm_separator_right_thin="‚ùØ"
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
# default statusbar colors
set -g status-bg colour0
set -g status-fg $tm_color_active
set -g status-bg default
set -g status-style default
# default window title colors
set-window-option -g window-status-style fg=$tm_color_inactive
set-window-option -g window-status-style bg=default
set -g window-status-format "#I #W"
# active window title colors
set-window-option -g window-status-current-style fg=$tm_color_active
set-window-option -g window-status-current-style bg=default
set-window-option -g window-status-current-format "#[bold]#I #W"
# pane border
set-option -g pane-border-style fg=$tm_color_inactive
set-option -g pane-active-border-style fg=$tm_active_border_color
# message text
set -g message-style bg=default
set -g message-style fg=$tm_color_active
# pane number display
set-option -g display-panes-active-colour $tm_color_active
set-option -g display-panes-colour $tm_color_inactive
# clock
set-window-option -g clock-mode-colour $tm_color_active
tm_date="#[fg=$tm_color_nactive] %R %d %b"
tm_host="#[fg=$tm_color_feature,bold]#h"
tm_session_name="#[fg=$tm_color_feature,bold]$tm_icon #S"
set -sg escape-time 0
set -g status-left $tm_session_name' '
set -g status-right $tm_tunes' '$tm_date' '
set -g default-shell $SHELL
# history
set -g history-limit 100000
# hot reload tmux conf
bind r source-file ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment