You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.8 KiB
Plaintext

# General
# set -ga terminal-overrides ",xterm-256color*:Tc"
# set -ga terminal-overrides ",xterm-kitty*:Tc"
# set -g default-terminal "xterm-kitty"
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",tmux-256color*:Tc"
set -s escape-time 0 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -g history-limit 50000
# Set prefix keybinding
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Set colors
source-file ~/.config/tmux/colors.conf
# Set status bar
source-file ~/.config/tmux/powerbar.conf
source-file ~/.config/tmux/parse_functions.conf
# Mouse mode on
setw -g mouse on
# Better window and pane naming
set -g base-index 1
setw -g pane-base-index 1
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 800 # slightly longer status messages display time
set -g status-interval 20 # redraw status line more often
setw -g aggressive-resize on # super useful when using "grouped sessions" and multi-monitor setup
# activity
set -g monitor-activity on
set -g visual-activity off
# Reload config on keybind r
bind R source-file ~/.config/tmux/tmux.conf
# Vi mode
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# create new window
bind c new-window -c "#{pane_current_path}"
# create session
bind C-c new-session -c "#{pane_current_path}"
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# Switch panes
bind-key v split-window -h -c "#{pane_current_path}"
bind-key V split-window -v -l 21 -c "#{pane_current_path}"
# vim-like pane switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# Move window positions
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
# bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 4
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# Synchronize panes
# bind e setw synchronize-panes on
# bind E setw synchronize-panes off
# setw synchronize-panes off
# window navigation
# unbind n
# unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
bind-key x kill-pane
bind-key q kill-window
# bind -r D neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md || nvim ~/dotfiles/todo.md"
#
# bind-key -r G run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/work/nrdp"
# bind-key -r C run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/work/tvui"
# bind-key -r R run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/work/milo"
# bind-key -r H run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/personal/vim-with-me"
# bind-key -r T run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/personal/harpoon"
# bind-key -r N run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/personal/vim-wr"
# bind-key -r S run-shell "~/dotfiles/awesome-streamerrc/ThePrimeagen/tmux2 /home/theprimeagen/personal/kl"