75 lines
2.0 KiB
Plaintext
75 lines
2.0 KiB
Plaintext
|
## set the default TERM
|
||
|
set -g default-terminal tmux
|
||
|
|
||
|
## update the TERM variable of terminal emulator when creating a new session or attaching a existing session
|
||
|
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
|
||
|
## determine if we should enable 256-colour support
|
||
|
if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal tmux-256color'
|
||
|
|
||
|
## Set window titles
|
||
|
set -g set-titles on
|
||
|
set -g set-titles-string "#T"
|
||
|
|
||
|
## Change default prefix key
|
||
|
#unbind C-b
|
||
|
set -g prefix ö
|
||
|
bind ö send-prefix
|
||
|
|
||
|
## More logical split commands
|
||
|
bind-key h split-window -h
|
||
|
bind-key v split-window -v
|
||
|
|
||
|
## Reload configuration
|
||
|
bind r source-file ~/.tmux.conf
|
||
|
|
||
|
## Mouse control
|
||
|
set -g mouse on
|
||
|
set -g history-limit 30000
|
||
|
|
||
|
## Copy and paste with X clipboard
|
||
|
# extra commands for interacting with the ICCCM clipboard
|
||
|
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
|
||
|
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
||
|
|
||
|
|
||
|
## "Vim friendly config" -- Arch Wiki...
|
||
|
set -sg escape-time 1
|
||
|
set -g base-index 1
|
||
|
setw -g pane-base-index 1
|
||
|
|
||
|
setw -g monitor-activity on
|
||
|
set -g visual-activity on
|
||
|
|
||
|
set -g mode-keys vi
|
||
|
|
||
|
# y and p as in vim
|
||
|
bind Escape copy-mode
|
||
|
unbind p
|
||
|
bind p paste-buffer
|
||
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||
|
bind-key -T copy-mode-vi 'Space' send -X halfpage-down
|
||
|
bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up
|
||
|
|
||
|
## moving between panes with vim movement keys
|
||
|
#bind h select-pane -L
|
||
|
#bind j select-pane -D
|
||
|
#bind k select-pane -U
|
||
|
#bind l select-pane -R
|
||
|
#
|
||
|
## moving between windows with vim movement keys
|
||
|
#bind -r C-h select-window -t :-
|
||
|
#bind -r C-l select-window -t :+
|
||
|
#
|
||
|
## resize panes with vim movement keys
|
||
|
#bind -r H resize-pane -L 5
|
||
|
#bind -r J resize-pane -D 5
|
||
|
#bind -r K resize-pane -U 5
|
||
|
#bind -r L resize-pane -R 5
|
||
|
|
||
|
## Powerline status bar
|
||
|
#source /usr/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf
|
||
|
|
||
|
## Status bar background color
|
||
|
set -ag status-style bg=cyan
|