aboutsummaryrefslogtreecommitdiff
path: root/.config/tmux/tmux.conf
diff options
context:
space:
mode:
Diffstat (limited to '.config/tmux/tmux.conf')
-rw-r--r--.config/tmux/tmux.conf67
1 files changed, 67 insertions, 0 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
new file mode 100644
index 0000000..3103807
--- /dev/null
+++ b/.config/tmux/tmux.conf
@@ -0,0 +1,67 @@
+# List of plugins
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin "nordtheme/tmux"
+
+# ========== General options ==========
+# Neovim told me to set these parameters
+set-option -sg escape-time 10
+set-option -g focus-events on
+# Tell tmux that foot support true color
+set -sa terminal-features 'foot*:sixel:sync:RGB:256:hyperlinks:usstyle:rectfill:focus:mouse'
+# Limit scrollback buffer to 100k lines
+set -g history-limit 100000
+# needed for large sixels
+set -gq input-buffer-size 10485760
+# Automatically renumber windows when a window is closed
+set -g renumber-windows on
+set -g display-panes-time 60000
+# Update envvars so hyprctl works
+set -g update-environment DISPLAY
+set -ga update-environment HYPRLAND_INSTANCE_SIGNATURE
+set -ga update-environment HYPRLAND_CMD
+set -ga update-environment WAYLAND_DISPLAY
+set -ga update-environment SWAYSOCK
+set -ga update-environment I3SOCK
+
+# ========== Keybinds ==========
+# Enable mouse
+set -g mouse on
+
+# Prefix is Ctrl-a
+set -g prefix C-a
+bind C-a send-prefix
+unbind C-b
+
+# Vim-like keybinds
+set -g mode-keys vi
+set -g status-keys vi
+
+# reload config on r
+bind r source-file "~/.config/tmux/tmux.conf"
+
+# Split pane into two
+bind \\ split-window -h -c "#{pane_current_path}"
+bind - split-window -v -c "#{pane_current_path}"
+unbind '"'
+unbind %
+
+# 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
+
+# Moving between windows with j and k
+# If a window to the right of the current window exists, switch to it, otherwise create a new one
+bind -r C-k if-shell -F '#{==:#{active_window_index},#{last_window_index}}' 'new-window' 'select-window -n'
+# If the current window is the leftmost window, do nothing
+bind -r C-j if-shell -F '#{>:#{window_index},0}' 'select-window -p'
+
+# resize panes with vim movement keys
+bind -r H resize-pane -L 1
+bind -r J resize-pane -D 1
+bind -r K resize-pane -U 1
+bind -r L resize-pane -R 1
+
+run '~/.config/tmux/plugins/tpm/tpm'