aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2022-10-06 20:34:21 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2022-10-06 20:34:21 +0200
commit6e7a1ffe67e133e13a1aacb55d92886950fe3a0d (patch)
treea32e5e43917c0c8acc634f41be516e85d68f31d3
parent0186f084b89a49932c834a7f18a17315aa3de999 (diff)
downloadconfigs-6e7a1ffe67e133e13a1aacb55d92886950fe3a0d.tar.gz
configs-6e7a1ffe67e133e13a1aacb55d92886950fe3a0d.zip
Clipboard with tmux and more window creation options.
-rw-r--r--stow/tmux/.tmux.conf23
1 files 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'