aboutsummaryrefslogtreecommitdiff
path: root/modules/tmux/tmux.conf
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-03-01 18:32:41 +0530
committerAkshay Nair <phenax5@gmail.com>2026-03-01 18:35:24 +0530
commit76739904202a362ffaa3e9e2ab99a55889419744 (patch)
treee70a4889bed8895fa8789dabb1fc5aecf19fcb69 /modules/tmux/tmux.conf
parent241e40ad8023922be73213a518c9624f737de066 (diff)
downloadnixos-config-76739904202a362ffaa3e9e2ab99a55889419744.tar.gz
nixos-config-76739904202a362ffaa3e9e2ab99a55889419744.zip
Tmux + kakoune package update
Diffstat (limited to 'modules/tmux/tmux.conf')
-rw-r--r--modules/tmux/tmux.conf81
1 files changed, 81 insertions, 0 deletions
diff --git a/modules/tmux/tmux.conf b/modules/tmux/tmux.conf
new file mode 100644
index 0000000..0ca4712
--- /dev/null
+++ b/modules/tmux/tmux.conf
@@ -0,0 +1,81 @@
+set -g display-time 4000
+set -g base-index 1
+setw -g pane-base-index 1
+setw -g pane-base-index 1
+set -g renumber-windows on
+set -g monitor-bell off
+set -g pane-active-border-style "fg=brightcyan bg=default"
+set -g pane-border-style "fg=black bg=default"
+set -g pane-border-lines simple
+set -g pane-border-indicators arrows
+set -g status-keys emacs
+set -g set-clipboard on
+set -g default-terminal "screen-256color"
+set -g focus-events on
+set -g alternate-screen on
+setw -g aggressive-resize on
+
+bind r source-file ~/.config/tmux/tmux.conf
+bind C-q send-prefix
+bind q last-pane
+
+# Selection
+setw -g mode-keys vi
+bind-key -T copy-mode-vi v send-keys -X begin-selection
+bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
+bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+
+# Statusline
+set -g status-left-style "fg=white bg=default"
+set -g status-right-style "fg=white bg=default"
+set -g status-style "fg=white bg=default"
+set -g message-style "fg=white bg=default"
+set -g status-justify right
+set -g window-status-format "#I:#W"
+set -g window-status-current-format "#[bold][#I:#W]"
+
+# Only show status if there are multiple windows
+set -g status off
+set -g status-left ''
+set -g status-right ''
+set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"'
+set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"'
+
+# Window styles
+set -g window-style 'bg=#0f0f0f'
+set -g window-active-style 'bg=#000000'
+
+# Windows/panes management
+bind C-v split-window -vc "#{pane_current_path}"
+bind v split-window -vc "#{pane_current_path}"
+bind C-s split-window -hc "#{pane_current_path}"
+bind s split-window -hc "#{pane_current_path}"
+
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r H resize-pane -L 5
+bind -r L resize-pane -R 5
+
+bind j select-pane -D
+bind C-j select-pane -D
+bind k select-pane -U
+bind C-k select-pane -U
+bind h select-pane -L
+bind C-h select-pane -L
+bind l select-pane -R
+bind C-l select-pane -R
+bind M-j swap-pane -D
+bind M-k swap-pane -U
+
+bind -n M-1 select-window -t 1
+bind -n M-2 select-window -t 2
+bind -n M-3 select-window -t 3
+bind -n M-4 select-window -t 4
+bind -n M-5 select-window -t 5
+bind -n M-6 select-window -t 6
+bind -n M-7 select-window -t 7
+bind -n M-8 select-window -t 8
+bind -n M-9 select-window -t 9