summaryrefslogtreecommitdiff
path: root/.config/tmux
diff options
context:
space:
mode:
authorCryxtalix <fgx8p9t@protonmail.com>2024-11-08 21:58:55 +0800
committerCryxtalix <fgx8p9t@protonmail.com>2024-11-08 21:58:55 +0800
commitdc839e971ad6a724bc99bccc6dfaa11ee8a1eaa9 (patch)
tree79e1ee75429a5ef500f716d3675aeec6c52dcda1 /.config/tmux
Init gnu stow
Diffstat (limited to '.config/tmux')
-rw-r--r--.config/tmux/tmux.conf41
1 files changed, 41 insertions, 0 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
new file mode 100644
index 0000000..fae79a3
--- /dev/null
+++ b/.config/tmux/tmux.conf
@@ -0,0 +1,41 @@
+# -g for global
+# -n to not require prefix key
+
+# Source bashrc
+set-option -g default-command $SHELL
+
+# Set base index to 1
+set -g base-index 1
+set-window-option -g pane-base-index 1
+
+# Prefix-r to reload configuration
+bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded"
+
+# Enable mouse controls
+set -g mouse on
+
+# Prefix key to Ctrl-Space
+unbind C-b
+set-option -g prefix C-Space
+bind C-Space send-prefix
+
+# Prefix-v/h to create panes
+bind v split-window -h
+bind h split-window -v
+
+# Alt-arrow to switch panes
+bind -n M-Left select-pane -L
+bind -n M-Right select-pane -R
+bind -n M-Up select-pane -U
+bind -n M-Down select-pane -D
+
+# Ctrl-arrow to switch windows
+bind -n C-Left previous-window
+bind -n C-Right next-window
+
+# Ctrl-Shift-arrow to change window order
+bind -n C-S-Left swap-window -t -1 \; previous-window
+bind -n C-S-Right swap-window -t +1 \; next-window
+
+# Synchronize panes
+bind-key s set-window-option synchronize-panes\; display-message "Synchronize mode on"