style(tmux): colors

This commit is contained in:
thek4n 2024-05-13 09:38:18 +03:00
parent 661df0ed20
commit 6cef4e1023
3 changed files with 33 additions and 23 deletions

View File

@ -28,17 +28,17 @@ bind s choose-tree -ZsK '#{?#{e|<:#{line},9},#{e|+:1,#{line}},#{?#{e|<:#{line},3
bind n command-prompt -p "New session:" "new-session -A -d -s '%1' -c ~ \; switch-client -t '%1'" bind n command-prompt -p "New session:" "new-session -A -d -s '%1' -c ~ \; switch-client -t '%1'"
# Kill last session
bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\""
# Kill session and reattach to last session # Kill session and reattach to last session
bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'" bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'"
bind k confirm-before -p "kill current pane? (y/n)" "kill-pane"
# Kill other windows # Kill other windows
bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a" bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a"
# kill pane
# Kill last session bind k confirm-before -p "kill current pane? (y/n)" "kill-pane"
bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\""
# SSH Session # SSH Session
@ -116,6 +116,7 @@ bind -n C-M-k resize-pane -U
setw -g mode-keys vi setw -g mode-keys vi
bind v copy-mode bind v copy-mode
bind p paste-buffer bind p paste-buffer
bind C-p choose-buffer
## Toggle selection ## Toggle selection
bind -T copy-mode-vi v if -F '#{selection_active}' 'send-keys -X clear-selection' 'send-keys -X begin-selection' bind -T copy-mode-vi v if -F '#{selection_active}' 'send-keys -X clear-selection' 'send-keys -X begin-selection'
@ -128,6 +129,10 @@ bind -T copy-mode-vi C-c send-keys -X cancel
bind -T copy-mode-vi q send-keys -X cancel bind -T copy-mode-vi q send-keys -X cancel
bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
# Session managment # Session managment
bind 1 run-shell ~/.tmux/01.sh bind 1 run-shell ~/.tmux/01.sh
bind 2 run-shell ~/.tmux/02.sh bind 2 run-shell ~/.tmux/02.sh

View File

@ -33,6 +33,3 @@ set -ga update-environment 'SSH_AUTH_SOCK'
set -ga update-environment 'SSH_AGENT_PID' set -ga update-environment 'SSH_AGENT_PID'
set -ga update-environment 'SSH_CONNECTION' set -ga update-environment 'SSH_CONNECTION'
set -ga update-environment 'SSH_TTY' set -ga update-environment 'SSH_TTY'
tmux_conf_copy_to_os_clipboard=true

View File

@ -1,30 +1,38 @@
# vim: ft=tmux # vim: ft=tmux
_tmux_color_inactive_background="colour236"
_tmux_color_main_background="terminal"
_tmux_color_main_style="blue"
_tmux_color_activity_style="colour239"
# misc # misc
set -g bell-action none set -g bell-action none
set -g message-style 'fg=black bg=white bold' set -g message-style "fg=black bg=white bold"
set -g mode-style "fg=default,bg=$_tmux_color_main_style"
# status style # status style
set -g status-style 'bg=default,fg=white' set -g status-style "bg=default,fg=white"
set -g status-justify absolute-centre set -g status-justify absolute-centre
set -g status-left "[#S@#H] " set -g status-left "[#S@#H] "
set -g status-left-length 60 set -g status-left-length 60
set -g status-right '%d.%m.%Y %a %H:%M' set -g status-right "%d.%m.%Y %a %H:%M"
set -g status-right-length 200 set -g status-right-length 200
set -g window-status-separator ' ' set -g window-status-separator " "
set -g window-status-style 'bg=default' set -g window-status-style "bg=$_tmux_color_main_background"
set -g window-status-current-style 'bg=white,fg=black bold' set -g window-status-current-style "bg=white,fg=black bold"
set -g window-status-format '#W#{?window_flags,#{window_flags}, }' set -g window-status-format "#W#{?window_flags,#{window_flags}, }"
set -g window-status-current-format '#W#{?window_flags,#{window_flags}, }' set -g window-status-current-format "#W#{?window_flags,#{window_flags}, }"
set -g window-status-activity-style 'bg=colour239' set -g window-status-activity-style "bg=$_tmux_color_activity_style"
setw -g monitor-activity on setw -g monitor-activity on
# window title style # window title style
set -g set-titles on set -g set-titles on
set -g set-titles-string '#S:#I.#P #W' set -g set-titles-string "#S:#I.#P #W"
# clock style # clock style
@ -35,9 +43,9 @@ setw -g clock-mode-style 24
# borders # borders
set -g pane-border-lines double set -g pane-border-lines double
set -g pane-border-indicators colour set -g pane-border-indicators colour
set -g pane-border-style 'bg=colour236' set -g pane-border-style "bg=$_tmux_color_inactive_background"
set -g pane-active-border-style 'bg=colour236,fg=blue' set -g pane-active-border-style "bg=$_tmux_color_inactive_background,fg=$_tmux_color_main_style"
set -g window-style 'fg=colour247,bg=colour236' set -g window-style "fg=colour247,bg=$_tmux_color_inactive_background"
set -g window-active-style 'fg=terminal,bg=terminal' set -g window-active-style "fg=$_tmux_color_main_background,bg=$_tmux_color_main_background"