diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index da2dee0..5c28421 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -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'" +# 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 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 bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a" - -# 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 pane +bind k confirm-before -p "kill current pane? (y/n)" "kill-pane" # SSH Session @@ -116,6 +116,7 @@ bind -n C-M-k resize-pane -U setw -g mode-keys vi bind v copy-mode bind p paste-buffer +bind C-p choose-buffer ## Toggle 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 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 bind 1 run-shell ~/.tmux/01.sh bind 2 run-shell ~/.tmux/02.sh diff --git a/home/user/.config/tmux/options.conf b/home/user/.config/tmux/options.conf index 13588e1..ebafe43 100644 --- a/home/user/.config/tmux/options.conf +++ b/home/user/.config/tmux/options.conf @@ -32,7 +32,4 @@ set -ga update-environment 'SSH_ASKPASS' set -ga update-environment 'SSH_AUTH_SOCK' set -ga update-environment 'SSH_AGENT_PID' set -ga update-environment 'SSH_CONNECTION' -set -ga update-environment 'SSH_TTY' - - -tmux_conf_copy_to_os_clipboard=true \ No newline at end of file +set -ga update-environment 'SSH_TTY' \ No newline at end of file diff --git a/home/user/.config/tmux/style.conf b/home/user/.config/tmux/style.conf index 15fdc53..6e4fa62 100644 --- a/home/user/.config/tmux/style.conf +++ b/home/user/.config/tmux/style.conf @@ -1,30 +1,38 @@ # vim: ft=tmux +_tmux_color_inactive_background="colour236" +_tmux_color_main_background="terminal" +_tmux_color_main_style="blue" +_tmux_color_activity_style="colour239" + # misc 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 -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-left "[#S@#H] " 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 window-status-separator ' ' -set -g window-status-style 'bg=default' -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-current-format '#W#{?window_flags,#{window_flags}, }' -set -g window-status-activity-style 'bg=colour239' +set -g window-status-separator " " +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-format "#W#{?window_flags,#{window_flags}, }" +set -g window-status-current-format "#W#{?window_flags,#{window_flags}, }" +set -g window-status-activity-style "bg=$_tmux_color_activity_style" setw -g monitor-activity on # window title style 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 @@ -35,9 +43,9 @@ setw -g clock-mode-style 24 # borders set -g pane-border-lines double set -g pane-border-indicators colour -set -g pane-border-style 'bg=colour236' -set -g pane-active-border-style 'bg=colour236,fg=blue' +set -g pane-border-style "bg=$_tmux_color_inactive_background" +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-active-style 'fg=terminal,bg=terminal' \ No newline at end of file +set -g window-style "fg=colour247,bg=$_tmux_color_inactive_background" +set -g window-active-style "fg=$_tmux_color_main_background,bg=$_tmux_color_main_background" \ No newline at end of file