75 lines
1.9 KiB
Plaintext
75 lines
1.9 KiB
Plaintext
# remap <C-b> to <C-t>.
|
|
unbind-key C-b
|
|
set-option -g prefix C-t
|
|
bind-key C-t send-prefix
|
|
|
|
# disable escape delay.
|
|
set -sg escape-time 0
|
|
|
|
# remap split keys.
|
|
bind -n M-| split-window -h -c "#{pane_current_path}"
|
|
bind -n M-- split-window -v -c "#{pane_current_path}"
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# reload config.
|
|
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
|
|
|
# swith panes with alt + hjkl.
|
|
bind -n M-a select-pane -L
|
|
bind -n M-d select-pane -R
|
|
bind -n M-w select-pane -U
|
|
bind -n M-s select-pane -D
|
|
|
|
# close pane.
|
|
bind -n M-c kill-pane
|
|
|
|
# create new window.
|
|
bind -n M-Escape new-window -c "#{pane_current_path}"
|
|
bind -n M-t new-window -c "#{pane_current_path}" # NOTE: for compatibility with Termux as it does not support <C-Esc> yet.
|
|
|
|
# close window.
|
|
bind -n M-x kill-window
|
|
|
|
# switch window.
|
|
bind -n M-e next-window
|
|
bind -n M-q previous-window
|
|
|
|
# move window.
|
|
bind -n M-E swap-window -t +1\; select-window -t +1
|
|
bind -n M-Q swap-window -t -1\; select-window -t -1
|
|
|
|
# detach.
|
|
bind -n M-z detach-client
|
|
|
|
# scroll.
|
|
bind -n M-p copy-mode -u
|
|
bind -n M-n send-keys Pagedown
|
|
|
|
# copy mode.
|
|
setw -g mode-keys vi
|
|
bind -n M-v copy-mode
|
|
bind -n M-P paste-buffer
|
|
bind -T copy-mode-vi v send -X begin-selection
|
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
|
|
|
# Resize to smallest client.
|
|
set -g window-size smallest
|
|
|
|
# statusbar
|
|
set -g status-position bottom
|
|
set -g status-justify left
|
|
set -g status-style 'bg=yellow fg=black dim'
|
|
set -g status-left ' #H-#S '
|
|
set -g status-right '#[fg=black,bg=orange] #(head -c -1 /sys/class/power_supply/BAT*/capacity 2> /dev/null && echo -n "% ")%Y-%m-%d %H:%M '
|
|
set -g status-right-length 50
|
|
set -g status-left-length 20
|
|
|
|
setw -g window-status-current-style 'fg=black bg=orange bold'
|
|
setw -g window-status-current-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F '
|
|
|
|
setw -g window-status-style 'fg=black bg=darkgray'
|
|
setw -g window-status-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F '
|
|
|
|
setw -g window-status-bell-style 'fg=black bg=white bold'
|