99 lines
2.5 KiB
Plaintext
99 lines
2.5 KiB
Plaintext
# remap prefix from 'C-b' to '`'
|
|
|
|
unbind C-b
|
|
set-option -g prefix '`'
|
|
bind-key '`' send-prefix
|
|
|
|
# mouse scrolling
|
|
setw -g mouse on
|
|
|
|
# 1-indexed windows
|
|
set -g base-index 1
|
|
|
|
# 1-indexed panes to match the windows.
|
|
setw -g pane-base-index 1
|
|
|
|
# Look nice.
|
|
set -g default-terminal screen-256color
|
|
|
|
# split panes using | and -
|
|
bind | split-window -h
|
|
bind - split-window -v
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# reload config file (change file location to your the tmux.conf you want to use)
|
|
bind r source-file ~/.config/tmux/tmux.conf\; display ' Reloaded tmux config.'
|
|
|
|
# Create a new session
|
|
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
|
|
|
|
# # switch panes using Alt-arrow without prefix
|
|
# bind -n M-Left select-pane -L
|
|
# bind -n M-Right select-pane -R
|
|
# bind -n M-Up select-pane -U
|
|
# bind -n M-Down select-pane -D
|
|
|
|
# Shift + arrow key to move between windows.
|
|
bind-key -n S-Left previous-window
|
|
bind-key -n S-Right next-window
|
|
|
|
# Faster Esc
|
|
set-option -sg escape-time 10
|
|
|
|
# Plugins
|
|
# Install: <leader>I
|
|
# Uninstall: <leader><alt>u
|
|
set -g @plugin 'tmux-plugins/tpm' # tmux plugin manager
|
|
|
|
# turn off detach session on destroy
|
|
set-option -g detach-on-destroy off
|
|
|
|
# Copy stuff from terminal
|
|
# Copy view: <leader><space>
|
|
# Copy to tmux register: lower case letter
|
|
# Paste instantly: upper case letter
|
|
# Paste from tmux register: <leader>=
|
|
set -g @plugin 'fcsonline/tmux-thumbs'
|
|
set -g @thumbs-key F
|
|
|
|
# Weather data
|
|
set -g @plugin 'xamut/tmux-weather'
|
|
set-option -g @tmux-weather-units "u"
|
|
|
|
# CPU
|
|
set -g @plugin 'tmux-plugins/tmux-cpu'
|
|
|
|
# Custom statusline
|
|
source ~/.config/tmux/statusline.conf
|
|
|
|
# set -g @plugin 'egel/tmux-gruvbox'
|
|
# set -g @tmux-gruvbox 'dark' # or 'light'
|
|
|
|
# Save and restore sessions
|
|
# <tmux-leader><ctrl>+r to restore
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
set -g @resurrect-strategy-nvim 'session'
|
|
set -g @continuum-restore 'on'
|
|
|
|
|
|
# testing this idk lol
|
|
set -g pane-active-border-style bg=terminal
|
|
set -g pane-border-style bg=terminal
|
|
set-window-option -g window-active-style bg=black
|
|
set-window-option -g window-style bg=terminal
|
|
|
|
# adding ssh support
|
|
set -g @plugin 'pschmitt/tmux-ssh-split'
|
|
set-option -g @ssh-split-h-key "|"
|
|
set-option -g @ssh-split-v-key "-"
|
|
set-option -g @ssh-split-w-key "C"
|
|
|
|
# Make /bin/bash the default shell, which will hopefully make it souce bashrc on startup
|
|
set-option -g default-shell "/bin/bash"
|
|
set-option -g default-command bash
|
|
|
|
# Initializes tmux plugin manager - keep this at the bottom
|
|
run '~/.config/tmux/plugins/tpm/tpm'
|