dotfiles/dotfiles/tmux.conf
pannekge-admin 1250cbd2ef Update
2021-07-21 09:36:32 +02:00

149 lines
4 KiB
Bash

# Options
# Set Prefix to Ctrl+a (screen like)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
## Default is 'screen'
set -sg default-terminal 'screen-256color'
set -sg escape-time 1
set -sg set-clipboard on
set -g history-limit 100000
setw -g alternate-screen on
set -g renumber-windows on
set -g base-index 1
setw -g pane-base-index 1
set -g status on
set -g status-position bottom
set -g status-justify left
set -g status-interval 1
set -g status-left-length 20
set -g status-right-length 30
set -g status-right '#[fg=black, bg=yellow] #h '
#set -g status-right '#(eval ~/bin/tmux-airline `tmux display -p "#{client_width}"`)'
set -g status-left ''
set -g set-titles on
set -g set-titles-string '#T'
setw -g allow-rename off
setw -g automatic-rename on
setw -g automatic-rename-format '#T'
setw -g window-status-format ' #I  #{=120:window_name} '
setw -g window-status-current-format '#[fg=black, bg=yellow] #I  #{=120:window_name} #[fg=yellow, bg=black]'
#set-window-option -g window-status-current-attr bold
#setw -g window-status-format '/ #I:#P #{=120:window_name} |#F \'
#setw -g window-status-current-format '/ #I:#P #{=120:window_name} |#F \'
setw -g window-status-separator ''
set -g bell-action current
#set -g bell-on-alert off
setw -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
set -g mouse on
#set -g status-keys vi
#setw -g mode-keys vi
#setw -g xterm-keys on
## Mouse Keybindings
# Faster Scrolling
#bind -t vi-copy WheelUpPane page-up
#bind -t vi-copy WheelDownPane page-down
#bind -t emacs-copy WheelUpPane page-up
#bind -t emacs-copy WheelDownPane page-down
## Keyboard keybindings
bind -n 'S-Down' resize-pane -D 1
bind -n 'S-Up' resize-pane -U 1
bind -n 'S-Left' resize-pane -L 1
bind -n 'S-Right' resize-pane -R 1
bind -n End send-key C-e
bind -n Home send-key C-a
# copypaste
#bind-key -n -t emacs-copy C-x copy-pipe "xclip -i -sel p -f | xclip -i -sel c "
#bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# Splitscreen mit Alt+Arrow wechseln
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind 'c' new-window
bind 'n' next
bind 'p' prev
bind 'b' swap-window -t -1
#urxvt tab like window switching (-n: no prior escape seq)
bind -n S-down new-window
bind -n S-left prev
bind -n S-right next
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1
## Splitting panes
bind 'h' split-window -v
bind 'v' split-window -h
## Mouse toggling
bind m \
set -g mouse on \;\
display 'Mouse: ON'
bind k \
set -g mouse off \;\
display 'Mouse: OFF'
set-window-option -g xterm-keys on
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-style fg=colour136,bg=colour235 #yellow and base02
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default #base0 and default
#set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default #orange and default
#set-window-option -g window-status-current-style bright
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style fg=colour166,bg=colour235 #orange and base02
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
## TPM
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @tmux_power_theme 'forest'
#set -g @tmux_power_theme '#483D8B'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'