You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.9 KiB

unbind C-b
set -g prefix C-a
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
#set -g default-terminal tmux-256color
#set -g default-terminal screen-256color
set -g default-terminal xterm-256color
set -g base-index 1
set -g default-command "${SHELL}"
# Mouse
set -g mouse on
set -ag terminal-overrides ",st-*:Tc"
set -g history-limit 30000
# Scrolling in copy-mode
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# Fast scroll with Ctrl
bind-key -T root C-WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
# Toggle mouse on/off
bind-key m set-option -g mouse on \; display 'Mouse: ON'
bind-key M set-option -g mouse off \; display 'Mouse: OFF'
# Display
set -g display-time 5000
set -g monitor-activity on
set -g visual-activity on
set -g status-style fg=white,bg=default,default
set -g pane-border-style fg=default,bg=default
set -g message-style fg=yellow,bg=default
set -g set-titles on
set -g status on
set -g status-interval 3
set -g status-justify centre
set -g automatic-rename on
set -g status-position top
set -g pane-border-status top
set -g pane-border-format "###{pane_index} (#{pane_id}) #{pane_title}"
#source-file "${HOME}/.tmux-themepack/powerline/block/magenta.tmuxtheme"
# --------
setw -g mode-keys vi
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
#set -g @plugin 'jimeh/tmux-themepack'
#set -g @themepack 'powerline/block/blue'
run -b '~/.tmux/plugins/tpm/tpm'
# Extra style
set -g window-status-style fg=colour38,bg=default,dim
set -g pane-active-border-style fg=colour38,bg=default
set -g window-status-current-style fg=colour38,bg=default
# Left side
set -g status-left "#(~/.tmux/left)"
# Right side
set -g status-right '#(~/.tmux/right)'
# Tabs
set -g window-status-current-format "#[fg=yellow] #[fg=black]#[bg=yellow] #I #[fg=colour254, bg=colour237] #W "
set -g window-status-format "#[fg=colour39, nodim] #[fg=colour16, bg=colour39] #I #[fg=colour254, bg=colour237, dim] #W "
# Clipboard
set-option -g default-shell /usr/local/bin/zsh
# set-option -g default-shell /usr/bin/zsh
#set-option -g default-shell /usr/local/bin/xonsh
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "pbcopy"
bind-key Enter split-window -h
bind-key BSpace split-window -v
bind-key C-d split-window -h "pmenu"