summaryrefslogtreecommitdiff
path: root/.tmux.conf
diff options
context:
space:
mode:
authorlistout <listout@protonmail.com>2021-04-21 23:48:21 +0530
committerlistout <listout@protonmail.com>2021-04-21 23:48:21 +0530
commit851893836288961684150b122d7463544e47a5fa (patch)
tree298a7c117df2224ed5d15ac92075321598f0f441 /.tmux.conf
parent5030a3d05a13ad79be382983ea3898b2e1ae27ef (diff)
tmux config
Diffstat (limited to '.tmux.conf')
-rw-r--r--.tmux.conf51
1 files changed, 51 insertions, 0 deletions
diff --git a/.tmux.conf b/.tmux.conf
new file mode 100644
index 0000000..432b066
--- /dev/null
+++ b/.tmux.conf
@@ -0,0 +1,51 @@
+unbind C-b
+set -g prefix C-a
+bind C-a send-prefix
+
+set -g mouse on
+
+# set clipboard on
+set-option -g set-clipboard external
+
+# vim mode and copy keybindings
+setw -g mode-keys vi # list keybindings: tmux list-keys -T copy-mode-vi
+bind-key -T copy-mode-vi 'v' send -X begin-selection
+bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
+bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
+bind-key -T copy-mode-vi "Y" send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
+bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
+bind-key -T copy-mode-vi MouseDown3Pane select-pane # right mouse button (to highlight sutff)
+bind-key -T copy-mode-vi MouseDrag3Pane select-pane \; send-keys -X begin-selection
+unbind-key -T copy-mode-vi MouseDragEnd3Pane
+
+set -sg escape-time 1
+set -g base-index 1
+setw -g pane-base-index 1
+
+set -s default-terminal tmux-256color
+set -s terminal-overrides ''
+set -as terminal-overrides ',*:Tc'
+set-option -g xterm-keys on
+
+# reload config
+bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
+
+set -g history-limit 10000
+
+bind-key v split-window -h
+bind-key s split-window -v
+
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r L resize-pane -R 5
+
+# styling
+set -g status-style "fg=#b5b4c9 bg=#1c1c1c"
+
+# source-file ~/.tmux/moonfly.tmux.conf