2018-03-01 00:47:14 +01:00
|
|
|
|
|
|
|
# tmux display things in 256 colors
|
2018-05-06 09:34:20 +02:00
|
|
|
#set -g default-terminal "tmux"
|
2018-04-30 00:37:31 +02:00
|
|
|
|
|
|
|
# set terminfo for termite
|
|
|
|
set -ga terminal-overrides ",xterm-termite:Tc"
|
2018-03-01 00:47:14 +01:00
|
|
|
|
|
|
|
# set new history limit
|
|
|
|
set -g history-limit 30000
|
|
|
|
|
|
|
|
# screesaver after 600 sek
|
|
|
|
set -g lock-after-time 600
|
|
|
|
set -g lock-command "/usr/bin/cmatrix -C blue -s"
|
|
|
|
|
|
|
|
# automatically renumber tmux windows
|
|
|
|
set -g renumber-windows on
|
|
|
|
|
|
|
|
# set new prefix key
|
|
|
|
unbind C-b
|
|
|
|
set -g prefix C-a
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
|
|
|
# Activity Monitoring
|
|
|
|
setw -g monitor-activity off
|
|
|
|
set -g visual-activity off
|
|
|
|
|
|
|
|
# Rather than constraining window size to the maximum size of any client
|
|
|
|
# connected to the *session*, constrain window size to the maximum size of any
|
|
|
|
# client connected to *that window*. Much more reasonable.
|
|
|
|
#setw -g aggressive-resize on
|
|
|
|
|
|
|
|
# make delay shorter
|
|
|
|
set -sg escape-time 0
|
|
|
|
|
|
|
|
# tile all windows
|
|
|
|
#unbind =
|
|
|
|
#bind = select-layout tiled
|
|
|
|
|
|
|
|
# make window/pane index start with 1
|
|
|
|
set -g base-index 1
|
|
|
|
setw -g pane-base-index 1
|
|
|
|
|
|
|
|
new-session -A -s main
|
|
|
|
|
|
|
|
set-option -g set-titles on
|
|
|
|
set-option -g set-titles-string "#T - #W"
|
|
|
|
set-window-option -g automatic-rename on
|
|
|
|
|
|
|
|
# set config reload key
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
|
|
|
|
|
|
|
|
# enable mouse scrolling
|
|
|
|
set -g mouse on
|
|
|
|
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
|
|
|
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
#### Key Bindings ####
|
|
|
|
######################
|
|
|
|
|
|
|
|
# quickly open a new window
|
|
|
|
bind N new-window
|
|
|
|
|
|
|
|
# split window and fix path for tmux 1.9
|
|
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
|
|
|
|
# pane movement shortcuts
|
|
|
|
bind h select-pane -L
|
|
|
|
bind j select-pane -D
|
|
|
|
bind k select-pane -U
|
|
|
|
bind l select-pane -R
|
|
|
|
|
|
|
|
# Resize pane shortcuts
|
|
|
|
bind -r H resize-pane -L 10
|
|
|
|
bind -r J resize-pane -D 10
|
|
|
|
bind -r K resize-pane -U 10
|
|
|
|
bind -r L resize-pane -R 10
|
|
|
|
|
|
|
|
# maximizing and restoring windows
|
|
|
|
unbind Up
|
|
|
|
bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen
|
|
|
|
unbind Down
|
|
|
|
bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen
|
|
|
|
|
|
|
|
# set vi mode for copy mode
|
|
|
|
setw -g mode-keys vi
|
|
|
|
# more settings to make copy-mode more vim-like
|
|
|
|
unbind [
|
|
|
|
bind Escape copy-mode
|
|
|
|
unbind p
|
|
|
|
bind p paste-buffer
|
2018-04-30 00:37:31 +02:00
|
|
|
#bind -t vi-copy 'v' begin-selection
|
|
|
|
#bind -t vi-copy 'y' copy-selection
|
2018-03-01 00:47:14 +01:00
|
|
|
|
|
|
|
##############################
|
|
|
|
### Color & Style Settings ###
|
|
|
|
##############################
|
|
|
|
|
|
|
|
source ~/.tmux/theme.sh
|
|
|
|
|
|
|
|
|
|
|
|
##############################
|
|
|
|
### Plugins ###
|
|
|
|
##############################
|
2018-04-30 00:37:31 +02:00
|
|
|
# <prefix + I> Install
|
|
|
|
# <prefix + U> Update
|
2018-03-01 00:47:14 +01:00
|
|
|
|
|
|
|
# List of plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-sidebar'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-open'
|
|
|
|
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
|