147 lines
5.0 KiB
Bash
147 lines
5.0 KiB
Bash
# set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
|
|
#
|
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'hallazzang/tmux-reset'
|
|
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=colour2'
|
|
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=colour2]#W #[fg=colour1]#F '
|
|
|
|
setw -g window-status-bell-style 'fg=colour2 bg=colour1 bold'
|
|
|
|
set -g message-style 'fg=colour1 bg=colour0 bold'
|
|
# messages
|
|
set -g message-style 'fg=colour1 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 @plugin 'catppuccin/tmux#v2.1.3' # See https://github.com/catppuccin/tmux/tags for additional tags
|
|
# set -g @catppuccin_flavor 'macchiato' # latte, frappe, macchiato or mocha
|
|
# set -g @plugin 'rose-pine/tmux'
|
|
set -g @plugin 'dracula/tmux'
|
|
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage"
|
|
set -g @session-wizard 'C-x'
|
|
set -g @rose_pine_variant 'main' # Options are 'main', 'moon' or 'dawn'
|
|
set -g @rose_pine_user 'off' # Turn on the username component in the statusbar
|
|
set -g @rose_pine_show_current_program 'off' # Forces tmux to show the current running program as window name
|
|
set -g @rose_pine_host 'off' # Enables hostname in the status bar
|
|
set -g @rose_pine_only_windows 'off' # Leaves only the window module, for max focus and space
|
|
set -g @rose_pine_date_time '%m-%d %H:%M:%S' # It accepts the date UNIX command format (man date for info)
|
|
set -g @tpm_plugins ' \
|
|
tmux-plugins/tpm \
|
|
tmux-plugins/tmux-sensible \
|
|
tmux-plugins/tmux-resurrect \
|
|
alexwforsythe/tmux-which-key \
|
|
'
|
|
# 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
|
|
unbind -n M-j
|
|
unbind -n M-k
|
|
bind -n M-l next-window
|
|
unbind -n Enter
|
|
|