79 lines
2.0 KiB
Bash
79 lines
2.0 KiB
Bash
# change default prefix
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# emulate a color terminal emulator
|
|
set -g default-terminal "xterm-256color"
|
|
|
|
# vi mode
|
|
setw -g mode-keys vi
|
|
|
|
# unset the annoying delay
|
|
set -sg escape-time 0
|
|
|
|
# mouse settings
|
|
# set -g mouse on
|
|
# set -g set-clipboard on
|
|
# set -g focus-events on
|
|
|
|
# appearance
|
|
set -g status-style "bg=colour16 fg=white,bold"
|
|
set -g window-status-current-style "fg=yellow,bold"
|
|
|
|
set -g status-left-length 100
|
|
set -g status-right-length 100
|
|
|
|
# set -g status-right-style "bg=green fg=colour16,bold"
|
|
|
|
# set -g status-bg black
|
|
# set -g status-fg white
|
|
|
|
#==============#
|
|
# Key Bindings #
|
|
#==============#
|
|
|
|
# Select panes
|
|
bind-key h select-pane -L
|
|
bind-key j select-pane -D
|
|
bind-key k select-pane -U
|
|
bind-key l select-pane -R
|
|
bind-key C-k select-pane -L
|
|
bind-key C-j select-pane -D
|
|
bind-key C-k select-pane -U
|
|
bind-key C-l select-pane -R
|
|
|
|
# Resize panes
|
|
bind-key H resize-pane -L 10
|
|
bind-key J resize-pane -D 10
|
|
bind-key K resize-pane -U 10
|
|
bind-key L resize-pane -R 10
|
|
|
|
# Select windows
|
|
bind-key C-n next-window
|
|
bind-key C-p next-window
|
|
|
|
# Move windows easier
|
|
bind-key -r < swap-window -t -1
|
|
bind-key -r > swap-window -t +1
|
|
|
|
# New panes start in cwd
|
|
bind-key '"' split-window -v -c '#{pane_current_path}'
|
|
bind-key % split-window -h -c '#{pane_current_path}'
|
|
bind c new-window -c '#{pane_current_path}'
|
|
|
|
# re-source this conf
|
|
bind-key r source-file ~/.tmux.conf \; display-message "Sourced ~/.tmux.conf!"
|
|
|
|
# Run manual page in a split window
|
|
# bind-key K command-prompt "split-window 'exec man %%'"
|
|
|
|
# source local confs if they exist
|
|
if-shell -b '[ -f "$HOME/.config/tmux.conf" ]' "source-file ~/.config/tmux.conf"
|
|
if-shell -b '[ -f "$HOME/.local/tmux.conf" ]' "source-file ~/.local/tmux.conf"
|
|
|
|
# I really like tmux, but the way the handle backwards-compat in their config SUCKS!!
|
|
# https://stackoverflow.com/questions/35016458/how-to-write-if-statement-in-tmux-conf-to-set-different-options-for-different-t
|
|
# https://github.com/tmux/tmux/issues/1732
|
|
|