# set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" set -g @plugin 'tmux-plugins/tpm' unbind C-b set-option -g prefix C-x bind-key C-x send-prefix # split panes using | and - unbind '"' unbind % bind | split-window -h bind - split-window -v # reload config file (change file location to your the tmux.conf you want to use) bind r source-file ~/.tmux.conf # # switch panes using Alt-arrow without prefix # bind -n M-S-Left select-pane -L # bind -n M-S-Right select-pane -R # bind -n M-S-Up select-pane -U # bind -n M-S-Down select-pane -D #bind -n C-c display-popup -C "tmux new-session -A -s scratch" # Enable mouse control (clickable windows, panes, resizable panes) set -g mouse on # don't rename windows automatically set-option -g allow-rename off # DESIGN TWEAKS # don't do anything when a 'bell' rings set -g visual-activity off set -g visual-bell off set -g visual-silence off setw -g monitor-activity off set -g bell-action none # clock mode setw -g clock-mode-colour colour1 # copy mode setw -g mode-style 'fg=colour1 bg=colour18 bold' # pane borders set -g pane-border-style 'fg=colour1' set -g pane-active-border-style 'fg=colour3' # statusbar set -g status-position bottom set -g status-justify left set -g status-style 'fg=colour1' set -g status-left '' set -g status-right '%Y-%m-%d %H:%M ' set -g status-right-length 50 set -g status-left-length 10 setw -g window-status-current-style 'fg=colour0 bg=colour1 bold' setw -g window-status-current-format ' #I #W #F ' setw -g window-status-style 'fg=colour1 dim' setw -g window-status-format ' #I #[fg=colour7]#W #[fg=colour1]#F ' setw -g window-status-bell-style 'fg=colour2 bg=colour1 bold' set -g message-style 'fg=colour2 bg=colour0 bold' # messages set -g message-style 'fg=colour2 bg=colour0 bold' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'catppuccin/tmux' # main branch set -g @catppuccin_flavor 'mocha' # latte,frappe, macchiato or mocha set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin '27medkamal/tmux-session-wizard' set -g @plugin 'jabirali/tmux-tilish' set -g @plugin 'Nybkox/tmux-kanagawa' # set -g @kanagawa-theme 'lotus' set -g @session-wizard 'C-x' # fix clipboard in neovim set-option -g set-clipboard on # bind C-c run "tmux save-buffer - | xclip -selection clipboard" # bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; new-window -n '[scrollback]' 'n /tmp/tmux-buffer; rm /tmp/tmux-buffer; tmux kill-window' # bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; split-window -h "nvim /tmp/tmux-buffer" # bind C-c copy-mode bind C-v run "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" setw -g mode-keys vi bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip" # scrollback edit set-option -g history-limit 20000 bind-key C-e run-shell "/home/omnissiah/git/config/scripts/tmux-edit-scrollback" # END scrollback edit # set-environment -g PATH "/usr/local/bin:/bin:/usr/bin:/home/linuxbrew/.linuxbrew/bin" # run '~/.tmux/plugins/tpm/tpm' ## Navigator.nvim keybinds version_pat='s/^tmux[^0-9]*([.0-9]+).*/\1/p' is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" # bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" # bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" # Persistent floating pane with bind-key \\ run-shell 'tmux-td' # bind-key \\ run-shell "tmux display-popup -E 'tmux detach-client'" # bind u copy-mode unbind u unbind -n u bind-key -T copy-mode-vi C-h select-pane -L # bind-key -T copy-mode-vi C-j select-pane -D # bind-key -T copy-mode-vi C-k select-pane -U bind-key -T copy-mode-vi C-l select-pane -R # END Navigator.nvim keybinds bind -n M-h previous-window bind -n M-l next-window