Tmux : Update style.

This commit is contained in:
Dmitry Voronin 2024-02-13 04:07:58 +03:00
parent 19e660dee4
commit 4c3bc70373

View file

@ -8,7 +8,7 @@ set -sg escape-time 0
# Remap split keys. # Remap split keys.
bind -n M-\\ split-window -h -c "#{pane_current_path}" bind -n M-\\ split-window -h -c "#{pane_current_path}"
bind -n M-- split-window -v -c "#{pane_current_path}" bind -n M-- split-window -v -c "#{pane_current_path}"
bind -n M-= select-layout tiled bind -n M-= select-layout tiled
bind -n M-W resize-pane -U 1 bind -n M-W resize-pane -U 1
bind -n M-S resize-pane -D 1 bind -n M-S resize-pane -D 1
@ -32,7 +32,7 @@ bind -n M-C kill-pane -a
# Create new window. # Create new window.
bind -n M-Escape new-window -c "#{pane_current_path}" 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. 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. # Close window.
bind -n M-x kill-window bind -n M-x kill-window
@ -58,7 +58,7 @@ bind -n M-n send-keys Pagedown
setw -g mode-keys vi setw -g mode-keys vi
bind -n M-v copy-mode bind -n M-v copy-mode
bind -n M-P choose-buffer bind -n M-P choose-buffer
bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# Switch sessions. # Switch sessions.
@ -70,21 +70,26 @@ bind -n M-g choose-session
set -g window-size smallest set -g window-size smallest
# Statusbar. # Statusbar.
set -g status-interval 2
set -g status-position bottom set -g status-position bottom
set -g status-justify left set -g status-justify centre
set -g status-style 'bg=color236 fg=color187' set -g status-style 'bg=color236 fg=color187'
set -g status-left ' #H-#S #(count=$(tmux list-clients -t #S | wc -l); [ ${count} -gt 1 ] && echo "(${count}) ")'
set -g status-right '#[fg=color187,bg=color239] #(head -c -1 /sys/class/power_supply/BAT*/capacity 2> /dev/null && echo -n "% ")%Y-%m-%d %H:%M ' set -g status-left ' #[bold]#H-#S #(count=$(tmux list-clients -t #S | wc -l); [ ${count} -gt 1 ] && echo "(${count}) ")'
set -g status-right-length 50
set -g status-left-length 50 set -g status-left-length 50
set -g status-right '#[fg=color187,bg=color239] #(head -c -1 /sys/class/power_supply/BAT*/capacity 2> /dev/null && echo -n "% ")%Y-%m-%d #[bold]%H:%M '
set -g status-right-length 50
setw -g window-status-current-style 'fg=black bg=color143 bold' setw -g window-status-current-style 'fg=black bg=color143 bold'
setw -g window-status-current-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F ' setw -g window-status-current-format ' #[fg=black]#W#[fg=black] '
setw -g window-status-style 'fg=black bg=color138' setw -g window-status-style 'fg=black bg=color138'
setw -g window-status-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F ' setw -g window-status-format ' #[fg=black]#W#[fg=black] '
setw -g window-status-bell-style 'fg=black bg=white bold' setw -g window-status-bell-style 'fg=black bg=white bold'
# SSH fixes. # Selection style.
set -g mode-style 'fg=black,bg=yellow bold'
# Update environment from client.
set-option -g update-environment "SSH_CLIENT SSH_TTY DOCKER_CONFIG DOCKER_HOST DISPLAY XAUTHORITY" set-option -g update-environment "SSH_CLIENT SSH_TTY DOCKER_CONFIG DOCKER_HOST DISPLAY XAUTHORITY"