diff options
| author | ryukamish <[email protected]> | 2026-06-10 22:22:34 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-06-10 22:22:34 +0530 |
| commit | cea2a17e8704d2eed07ac4b157a563288dd6bdbf (patch) | |
| tree | 715ab05850fef20be895e1c3a2dddbe126788e4d /.config/tmux | |
| parent | 975fec3dd91537c7f2f5b500d59432dfdb3f031b (diff) | |
add: tmux
Diffstat (limited to '.config/tmux')
| -rw-r--r-- | .config/tmux/tmux.conf | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..d81ee5f --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,94 @@ +# Basic settings +set -a terminal-features 'tmux-256color:RGB' + +# Start numbering at 1 +set -g base-index 1 +set -g renumber-windows on + +# Status bar +# set -g status "on" +# set -g status-position top +# set -g status-justify absolute-centre +# set -g status-style "bg=default" +# set -g window-status-current-style "bg=white,fg=black,bold" +# set -g status-interval 5 +# set -g status-left "#S" +# set -g status-right "" +set -g status-position top +set -g status-interval 5 +set -g status-left-length 30 +set -g status-right-length 50 +set -g window-status-separator "" + +# Theme +set -g status-style "bg=default,fg=default" +set -g status-left "#[fg=black,bg=blue,bold] #S #[bg=default] " +# set -g status-right "#[fg=blue]#{?client_prefix,PREFIX ,}#{?window_zoomed_flag,ZOOM ,}#[fg=brightblack]#h " +set -g status-right "" +set -g window-status-format "#[fg=brightblack] #I:#W " +set -g window-status-current-format "#[fg=blue,bold] #I:#W " +set -g pane-border-style "fg=brightblack" +set -g pane-active-border-style "fg=blue" +set -g message-style "bg=default,fg=blue" +set -g message-command-style "bg=default,fg=blue" +set -g mode-style "bg=blue,fg=black" +setw -g clock-mode-colour blue + +# Change the default prefix to C-a +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# Split windows (opens in same directory as current window) +unbind % +unbind '"' +bind \\ split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" +bind v split-window -h -c "#{pane_current_path}" +bind s split-window -v -c "#{pane_current_path}" + +# Fast session switching +unbind-key s +bind -n M-s choose-tree -Zs # filtered session/window/tree view +bind -n M-S switch-client -l # jump to last session instantly + +# Alt+hjkl to switch panes w/o prefix +bind -n M-h select-pane -L +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n M-l select-pane -R + +# Alt+number to switch windows +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 + +# Vim style copying +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +unbind -T copy-mode-vi MouseDragEnd1Pane + +bind-key x kill-pane # Skip kill pane prompt +set -g detach-on-destroy off # don't exit from tmux when closing a session + +# Setting default shell to zsh +set-option -g default-shell /usr/bin/zsh + +# reload config file with a keystroke +unbind r +bind r source-file ~/.config/tmux/tmux.conf + +bind-key -n M-t run-shell "tmux neww ~/.local/bin/tmux-sessionizer" +bind-key -r M-h run-shell "tmux neww tmux-sessionizer -s 0" +bind-key -r M-j run-shell "tmux neww tmux-sessionizer -s 1" +bind-key -r M-k run-shell "tmux neww tmux-sessionizer -s 2" +bind-key -r M-l run-shell "tmux neww tmux-sessionizer -s 3" + |
