From 1e6841819b07535225b8375054978bcbeb654496 Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 24 Apr 2024 00:00:00 +0000 Subject: .config/tmux: Restore settings --- .config/tmux/tmux.conf | 54 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 08fb89b..73cb180 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -7,22 +7,36 @@ bind C-a send-prefix unbind C-b # reload configuration -bind r source-file ~/.config/tmux/tmux.conf \; run "printf ' # Reload tmux configuration\n' | tmux load-buffer - && tmux paste-buffer" +bind r source-file ~/.config/tmux/tmux.conf \; run "printf '# Reload tmux configuration\n' | tmux load-buffer - && tmux paste-buffer" # settings -set -g mouse on -set -g status off set -g base-index 1 +set -g history-limit 10000 set -g mode-keys vi +set -g monitor-activity on +set -g mouse on +set -g pane-base-index 1 +set -g pane-border-format "" +set -g pane-border-status top +set -g status on +set -g status-left '' +set -g status-position top +set -g status-right '' +set -g visual-activity off set -sg escape-time 1 -set -g visual-activity on -setw -g pane-base-index 1 -set -g history-limit 10000 -setw -g monitor-activity on +setw -g window-status-current-format " #I " +setw -g window-status-format " #I " -# border colours -set -g pane-border-style fg=colour0 -set -g pane-active-border-style fg=colour0 +# colours +set -g status-bg color0 +set -g pane-border-style fg=colour9 +set -g pane-active-border-style fg=colour9 +setw -g window-status-style fg=colour3 +setw -ga window-status-current-style bg=color9 + +# cycle windows +bind -n S-Right next-window # shift + --> +bind -n S-Left previous-window # shift + <-- # y and p as in vim unbind p @@ -36,6 +50,22 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel \; run "tmux bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i" bind -T root MouseDown2Pane run -b "xsel -o | tmux load-buffer - && tmux paste-buffer -s ' '" +# double click select +bind-key -n DoubleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send-keys -X select-word \; \ + run-shell "sleep .25s" \; \ + send-keys -X copy-pipe-and-cancel "xsel -i" + +# triple click select +bind-key -n TripleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send-keys -X select-line \; \ + run-shell "sleep .25s" \; \ + send-keys -X copy-pipe-and-cancel "xsel -i" + # split pane commands bind | split-window -h bind - split-window -v @@ -57,3 +87,7 @@ 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 + +# session saving +set -g @resurrect-processes 'make hugo dmesg journalctl' +run-shell ~/.config/tmux/plugins/tmux-resurrect/resurrect.tmux -- cgit v1.2.3