aboutsummaryrefslogtreecommitdiffstats
path: root/.tmux.conf
diff options
context:
space:
mode:
authormjfernez <mjf@mjfer.net>2021-12-22 17:50:34 -0500
committermjfernez <mjf@mjfer.net>2021-12-22 17:50:34 -0500
commit864ce0cff6ad530cdbe0bee133204c114d1905da (patch)
tree428b2c46ceeda798fda1f5c637f11118aac3135f /.tmux.conf
downloaddotfiles-master.tar.gz
first commitHEADmaster
Diffstat (limited to '.tmux.conf')
-rw-r--r--.tmux.conf40
1 files changed, 40 insertions, 0 deletions
diff --git a/.tmux.conf b/.tmux.conf
new file mode 100644
index 0000000..73a533a
--- /dev/null
+++ b/.tmux.conf
@@ -0,0 +1,40 @@
+# Options
+set -g mouse on # I know, I'm a monster
+set -g default-shell $SHELL
+# Start windows and panes at 1, not 0
+set -g base-index 1
+setw -g pane-base-index 1
+setw -g mode-keys vi
+set-option -s set-clipboard off
+
+# Bindings
+unbind-key C-b
+set -g prefix M-w
+
+
+bind-key % split-window -h -c "#{pane_current_path}"
+bind-key '"' split-window -v -c "#{pane_current_path}"
+bind-key C-v split-window -h -c "#{pane_current_path}"
+bind-key C-h split-window -v -c "#{pane_current_path}"
+bind-key C-n new-window -c "#{pane_current_path}"
+# vim like pane swap
+bind-key C-r swap-pane -D
+
+
+unbind-key C
+bind-key W command-prompt 'rename-window %%'
+bind-key S command-prompt 'rename-session %%'
+bind-key Q kill-server
+bind-key K kill-session -a
+bind-key C kill-window
+# bind y run -b "tmux show-buffer | xclip -selection c > /dev/null"
+
+# https://www.rockyourcode.com/copy-and-paste-in-tmux/
+bind P paste-buffer
+bind-key -T copy-mode-vi v send-keys -X begin-selection
+bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
+unbind -T copy-mode-vi Enter
+bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
+
+