2018-04-06 19:20:05 +02:00
|
|
|
# change the prefix from 'C-b' to 'M-a'
|
|
|
|
unbind C-b
|
|
|
|
set-option -g prefix M-a
|
|
|
|
bind-key M-a send-prefix
|
|
|
|
|
|
|
|
# start with window 1 (instead of 0)
|
2020-01-04 11:28:05 +01:00
|
|
|
# set -g base-index 1
|
2018-04-06 19:20:05 +02:00
|
|
|
|
|
|
|
# start with pane 1
|
2021-03-05 16:42:36 +01:00
|
|
|
# set -g pane-base-index 1
|
2018-04-06 19:20:05 +02:00
|
|
|
|
|
|
|
# split panes using | and -, make sure they open in the same path
|
|
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
|
|
|
|
unbind '"'
|
|
|
|
unbind %
|
|
|
|
|
|
|
|
# open new windows in the current path
|
|
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
|
|
|
|
# reload config file
|
2019-12-12 10:22:12 +01:00
|
|
|
bind r source-file ~/.tmux.conf \; display "Reloaded tmux.conf!"
|
2018-04-06 19:20:05 +02:00
|
|
|
|
|
|
|
unbind p
|
|
|
|
bind p previous-window
|
|
|
|
|
|
|
|
# shorten command delay
|
|
|
|
set -sg escape-time 1
|
|
|
|
|
2020-10-18 14:28:49 +02:00
|
|
|
# Increase scrollback buffer size
|
|
|
|
set -g history-limit 8192
|
|
|
|
|
2018-04-06 19:20:05 +02:00
|
|
|
# don't rename windows automatically
|
|
|
|
set-option -g allow-rename off
|
|
|
|
|
|
|
|
# mouse control (clickable windows, panes, resizable panes)
|
|
|
|
set -g mouse on
|
2018-11-14 15:13:47 +01:00
|
|
|
set -g focus-events on
|
2018-04-06 19:20:05 +02:00
|
|
|
|
2021-12-20 11:30:46 +01:00
|
|
|
# Use Ctrl-arrow keys without prefix key to switch panes
|
|
|
|
bind -n C-Left select-pane -L
|
|
|
|
bind -n C-Right select-pane -R
|
|
|
|
bind -n C-Up select-pane -U
|
|
|
|
bind -n C-Down select-pane -D
|
2018-04-06 19:20:05 +02:00
|
|
|
|
2019-12-12 10:22:12 +01:00
|
|
|
# Pane resizing with HJKL
|
|
|
|
bind H resize-pane -L 10
|
|
|
|
bind J resize-pane -D 10
|
|
|
|
bind K resize-pane -U 10
|
|
|
|
bind L resize-pane -R 10
|
|
|
|
|
|
|
|
# Move windows back/forward
|
|
|
|
bind -n S-left swap-window -t -1
|
|
|
|
bind -n S-right swap-window -t +1
|
2019-12-12 10:28:39 +01:00
|
|
|
bind m command-prompt -p "Merge pane to:" "join-pane -t '%%'"
|
|
|
|
bind M command-prompt -p "Merge pane from:" "join-pane -s '%%'"
|
2019-12-12 10:22:12 +01:00
|
|
|
|
|
|
|
bind e setw synchronize-panes on \; display "Synchronize panes ON (E: off)"
|
|
|
|
bind E setw synchronize-panes off \; display "Synchronize panes OFF (e: on)"
|
|
|
|
|
2021-03-05 16:42:36 +01:00
|
|
|
bind -n M-0 select-window -t 0
|
2019-12-12 10:22:12 +01:00
|
|
|
bind -n M-1 select-window -t 1
|
|
|
|
bind -n M-2 select-window -t 2
|
|
|
|
bind -n M-3 select-window -t 3
|
|
|
|
bind -n M-4 select-window -t 4
|
|
|
|
bind -n M-5 select-window -t 5
|
|
|
|
bind -n M-6 select-window -t 6
|
|
|
|
bind -n M-7 select-window -t 7
|
|
|
|
bind -n M-8 select-window -t 8
|
|
|
|
bind -n M-9 select-window -t 9
|
|
|
|
|
|
|
|
bind 0 select-pane -t 0
|
|
|
|
bind 1 select-pane -t 1
|
|
|
|
bind 2 select-pane -t 2
|
|
|
|
bind 3 select-pane -t 3
|
|
|
|
bind 4 select-pane -t 4
|
|
|
|
bind 5 select-pane -t 5
|
|
|
|
bind 6 select-pane -t 6
|
|
|
|
bind 7 select-pane -t 7
|
|
|
|
bind 8 select-pane -t 8
|
|
|
|
bind 9 select-pane -t 9
|
|
|
|
|
2020-10-10 14:14:22 +02:00
|
|
|
bind P paste-buffer
|
|
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
|
|
bind-key -T copy-mode-vi y send-keys -X copy-selection
|
|
|
|
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
|
|
|
|
|
2022-01-27 10:10:14 +01:00
|
|
|
# foot as default terminal. This effects color rendering and typing on
|
|
|
|
# terminal.
|
|
|
|
set-option -g default-terminal "foot"
|
2018-04-06 19:20:05 +02:00
|
|
|
|
2020-11-19 11:56:31 +01:00
|
|
|
# Gruvbox dark color scheme
|
|
|
|
set-option -g status "on"
|
|
|
|
|
|
|
|
# Default statusbar color
|
|
|
|
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
|
|
|
|
|
|
|
|
# Default window title colors
|
|
|
|
set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
|
|
|
|
|
|
|
|
# Default window with an activity alert
|
|
|
|
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
|
|
|
|
|
|
|
|
# Active window title colors
|
|
|
|
set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
|
|
|
|
|
|
|
|
# Pane border
|
|
|
|
set-option -g pane-active-border-style fg=colour250 #fg2
|
|
|
|
set-option -g pane-border-style fg=colour237 #bg1
|
|
|
|
|
|
|
|
# Message infos
|
|
|
|
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
|
|
|
|
|
|
|
|
# Writing commands inactive
|
|
|
|
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
|
|
|
|
|
|
|
|
# Pane number display
|
|
|
|
set-option -g display-panes-active-colour colour250 #fg2
|
|
|
|
set-option -g display-panes-colour colour237 #bg1
|
|
|
|
|
|
|
|
# Clock
|
|
|
|
set-window-option -g clock-mode-colour colour109 #blue
|
|
|
|
|
|
|
|
# Bell
|
|
|
|
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
|
|
|
|
|
|
|
|
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
|
|
|
|
set-option -g status-justify "left"
|
|
|
|
set-option -g status-left-style none
|
|
|
|
set-option -g status-left-length "80"
|
|
|
|
set-option -g status-right-style none
|
|
|
|
set-option -g status-right-length "80"
|
|
|
|
set-window-option -g window-status-separator ""
|
|
|
|
|
|
|
|
set-option -g status-left "#[bg=colour241,fg=colour248] #S #[bg=colour237,fg=colour241,nobold,noitalics,nounderscore]"
|
|
|
|
set-option -g status-right "#[bg=colour237,fg=colour239 nobold, nounderscore, noitalics]#[bg=colour239,fg=colour246] %Y-%m-%d %H:%M #[bg=colour239,fg=colour248,nobold,noitalics,nounderscore]#[bg=colour248,fg=colour237] #h "
|
|
|
|
|
|
|
|
set-window-option -g window-status-current-format "#[bg=colour214,fg=colour237,nobold,noitalics,nounderscore]#[bg=colour214,fg=colour239] #I #[bg=colour214,fg=colour239,bold] #W #[bg=colour237,fg=colour214,nobold,noitalics,nounderscore]"
|
|
|
|
set-window-option -g window-status-format "#[bg=colour239,fg=colour237,noitalics]#[bg=colour239,fg=colour223] #I #[bg=colour239,fg=colour223] #W #[bg=colour237,fg=colour239,noitalics]"
|
2019-12-12 09:26:26 +01:00
|
|
|
|
2018-10-11 10:28:03 +02:00
|
|
|
# Plugins
|
2019-12-12 09:09:05 +01:00
|
|
|
run-shell '~/.tmux/plugins/tmux-resurrect/resurrect.tmux'
|
|
|
|
run-shell '~/.tmux/plugins/tmux-continuum/continuum.tmux'
|
|
|
|
run-shell '~/.tmux/plugins/tmux-yank/yank.tmux'
|
|
|
|
run-shell '~/.tmux/plugins/tmux-copycat/copycat.tmux'
|
|
|
|
run-shell '~/.tmux/plugins/tmux-open/open.tmux'
|
2020-10-12 13:38:39 +02:00
|
|
|
run-shell '~/.tmux/plugins/tmux-butler/tmux-butler.tmux'
|
2018-10-11 10:28:03 +02:00
|
|
|
|
|
|
|
set -g @continuum-restore 'on'
|