dotfiles/general/.config/tmux/tmux.conf

102 lines
2.7 KiB
Plaintext
Raw Normal View History

2021-10-24 02:44:58 +02:00
# Don't rename windows automatically after rename with ','
set-option -g allow-rename off
set -g mouse on
set -q -g status-utf8 on
setw -q -g utf8 on
# setw -g mode-keys vi
set-option -g default-terminal screen-256color
set -g base-index 1 # windows starts at 1
setw -g monitor-activity on
set -g visual-activity on
set -s escape-time 0 # ESC time until registered
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
set -g base-index 1
set -g pane-base-index 0
######################
######## KEYS ########
######################
# Remap prefix from 'C-b' to 'C-a'
# Comments will use '$P' as prefix
2021-05-28 22:52:34 +02:00
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
2021-10-24 02:44:58 +02:00
# Split panes using $P-[gh]
2021-05-28 22:52:34 +02:00
bind h split-window -h -c "#{pane_current_path}"
bind g split-window -v -c "#{pane_current_path}"
unbind '"' # Unbind default vertical split
unbind % # Unbind default horizontal split
2021-10-24 02:44:58 +02:00
# Reload config using $P-r
2021-05-28 22:52:34 +02:00
unbind r
bind r \
2021-06-28 12:34:14 +02:00
source-file $XDG_CONFIG_HOME/tmux/tmux.conf\;\
2021-05-28 22:52:34 +02:00
display-message 'Reloaded tmux.conf'
2021-10-24 02:44:58 +02:00
# Switch panes using Alt-[hjkl]
2021-05-28 22:52:34 +02:00
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
2021-10-24 02:44:58 +02:00
# Resize pane using Alt-Shift-[hjkl]
2021-05-28 22:52:34 +02:00
bind -n M-H resize-pane -L 5
bind -n M-J resize-pane -D 5
bind -n M-K resize-pane -U 5
bind -n M-L resize-pane -R 5
2021-10-24 02:44:58 +02:00
# Fullscreen current pane using $P-Alt-z
2021-05-28 22:52:34 +02:00
unbind z
bind M-z resize-pane -Z
2021-10-24 02:44:58 +02:00
# Kill pane using $P-Backspace
2021-05-28 22:52:34 +02:00
unbind &
bind BSpace killp
# Swap clock-mode and new-window
2021-10-24 02:44:58 +02:00
# New tab: $P-t
# Clock mode: $P-c
2021-05-28 22:52:34 +02:00
unbind c
unbind t
bind c clock-mode
bind t new-window
# Setup 'y' to yank (copy)
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
######################
### DESIGN CHANGES ###
######################
2021-06-28 12:34:14 +02:00
set-option -g status-left '#[bg=blue]#[fg=black,bold] ###S #[bg=default] #[fg=green]#(~/.scripts/tmux/fcitx) #[fg=red]%H:%M '
2021-05-28 22:52:34 +02:00
set-option -g status-right '#[fg=red]#(~/.scripts/tmux/mpd)'
set-window-option -g window-status-current-style fg=magenta
set-option -g status-style 'bg=black fg=default'
set-option -g default-shell '/bin/zsh'
2021-06-28 12:34:14 +02:00
set -g status-position bottom
set -g status-interval 4
set -g status-justify centre # center align window list
setw -g status-bg default
setw -g window-status-format '#[bg=#888888]#[fg=black,bold] #I #[bg=default] #[fg=#888888]#W '
setw -g window-status-current-format '#[fg=black,bold]#[bg=cyan] #I #[fg=cyan]#[bg=default] #W '
2021-10-24 02:44:58 +02:00
#######################
####### PLUGINS #######
#######################
2021-05-28 22:52:34 +02:00
2021-10-24 02:44:58 +02:00
# tmux-thumbs - rewrite of tmux-fingers, copy pasting using hints
run-shell $HOME/.config/tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
2021-05-28 22:52:34 +02:00
# vim: filetype=.tmux.conf: