From 6e7a1ffe67e133e13a1aacb55d92886950fe3a0d Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 6 Oct 2022 20:34:21 +0200 Subject: Clipboard with tmux and more window creation options. --- stow/tmux/.tmux.conf | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/stow/tmux/.tmux.conf b/stow/tmux/.tmux.conf index 0f65fa6..9c7200b 100644 --- a/stow/tmux/.tmux.conf +++ b/stow/tmux/.tmux.conf @@ -1,6 +1,7 @@ unbind C-b set -g prefix m-a bind m-a send-prefix + set-option -g default-terminal "screen-256color" set -g xterm-keys on #setw -g monitor-activity on @@ -38,17 +39,19 @@ set -g status-left '(#S) ' set -g base-index 0 set -s escape-time 0 bind r source-file ~/.tmux.conf \; display-message "Config reloaded" -bind-key C command-prompt -p "Name of new window:" "new-window -n '%%'" +bind C command-prompt -p "Name of new window:" "new-window -n '%%'" # moving between panes with vim movement keys -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R +bind -r h select-pane -L +bind -r j select-pane -D +bind -r k select-pane -U +bind -r l select-pane -R -# moving between windows with vim movement keys -#bind -r H select-window -t :- -#bind -r L select-window -t :+ +# Creating panes with vim movement keys +bind -r H split-window -hb +bind -r J split-window -v +bind -r K split-window -vb +bind -r L split-window -h # resize panes with vim movement keys bind -r m-h resize-pane -L 1 @@ -60,6 +63,10 @@ bind -r m-J resize-pane -D 10 bind -r m-K resize-pane -U 10 bind -r m-L resize-pane -R 10 +# clipboard stuff +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -bi' +bind P run 'xsel -bo | tmux load-buffer - ; tmux paste-buffer' + # cursor shape in nvim set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' -- cgit v1.2.1