mirror of
https://github.com/tedkulp/dotfiles
synced 2026-04-19 22:04:38 -04:00
139 lines
3.8 KiB
Bash
139 lines
3.8 KiB
Bash
set-option -g default-command "reattach-to-user-namespace -l zsh"
|
|
|
|
# Reset the config
|
|
unbind-key -a
|
|
source-file ~/.tmux.reset.conf
|
|
|
|
# Set prefix to something easy
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
bind a send-prefix
|
|
|
|
# Lose the delay
|
|
set -sg escape-time 1
|
|
|
|
# Change base index to 1
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# Reload config with prefix-r
|
|
bind r source-file ~/.tmux.conf \; display "Config Reloaded"
|
|
|
|
# Last window rocks
|
|
bind C-a last-window
|
|
|
|
# Easy keys for splitting panes
|
|
bind | split-window -h
|
|
bind - split-window -v
|
|
|
|
# Use multiple sessions -- it's da bomb, yo
|
|
bind C-s choose-session
|
|
|
|
# Move between panes vim style
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# Resize panes in a vim-ish style
|
|
bind -r H resize-pane -L 5
|
|
bind -r J resize-pane -D 5
|
|
bind -r K resize-pane -U 5
|
|
bind -r L resize-pane -R 5
|
|
|
|
# Move between windows in a vim-ish style
|
|
bind -r C-h select-window -t :-
|
|
bind -r C-l select-window -t :+
|
|
|
|
# Change ordering of windows
|
|
bind -r C-S-Left swap-window -t -1
|
|
bind -r C-S-Right swap-window -t +1
|
|
|
|
# Mouse Stuff
|
|
set -g mouse on
|
|
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
|
|
bind -n WheelDownPane select-pane -t= \; send-keys -M
|
|
|
|
# Make sure 256 color and utf-8 is enabled
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# Center the window list
|
|
set -g status-justify centre
|
|
|
|
# Update the status bar every sixty seconds
|
|
set -g status-interval 60
|
|
|
|
# enable vi keys.
|
|
setw -g mode-keys vi
|
|
set-window-option -g xterm-keys on
|
|
|
|
# Show changes in other windows
|
|
setw -g monitor-activity on
|
|
set -g visual-activity on
|
|
|
|
# pane movement
|
|
bind-key C-j command-prompt -p "join pane from:" "join-pane -s '%%'"
|
|
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
|
|
bind-key C-b break-pane -t :
|
|
|
|
# Copy/paste like vim -- Updated for 2.4
|
|
bind-key -Tcopy-mode-vi v send -X begin-selection
|
|
bind-key -Tcopy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
|
|
bind-key -Tcopy-mode-vi Escape send -X cancel
|
|
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
|
|
|
|
unbind -Tcopy-mode-vi Enter
|
|
bind-key -Tcopy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
|
|
|
|
#### COLOUR
|
|
|
|
# default statusbar colors
|
|
set-option -g status-bg colour235 #base02
|
|
set-option -g status-fg colour136 #yellow
|
|
set-option -g status-attr default
|
|
|
|
set-window-option -g window-status-activity-fg colour1 #red
|
|
set-window-option -g window-status-activity-bg colour235
|
|
# set-window-option -g window-status-activity-attr bright
|
|
|
|
# default window title colors
|
|
set-window-option -g window-status-fg colour166 #orange
|
|
set-window-option -g window-status-bg default
|
|
# set-window-option -g window-status-attr dim
|
|
|
|
# active window title colors
|
|
set-window-option -g window-status-current-fg colour166 #orange
|
|
set-window-option -g window-status-current-bg default
|
|
#set-window-option -g window-status-current-attr bright
|
|
|
|
# pane border
|
|
set-option -g pane-border-fg colour235 #base02
|
|
set-option -g pane-active-border-fg colour240 #base01
|
|
|
|
# message text
|
|
set-option -g message-bg colour235 #base02
|
|
set-option -g message-fg colour166 #orange
|
|
|
|
# pane number display
|
|
set-option -g display-panes-active-colour colour33 #blue
|
|
set-option -g display-panes-colour colour166 #orange
|
|
|
|
# clock
|
|
set-window-option -g clock-mode-colour colour64 #green
|
|
|
|
# Renumber windows
|
|
set-option -g renumber-windows on
|
|
|
|
#### Status Bar
|
|
|
|
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
|
|
set -g status-left-length 32
|
|
set -g status-right-length 150
|
|
set -g status-interval 5
|
|
|
|
set -g status-left '#[reverse] Session: #S #[noreverse]⮀ #I ⮁ #P'
|
|
set -g status-right '%R ⮃ %d %b ⮂#[reverse] #h '
|
|
|
|
set -g window-status-format ' #I #W '
|
|
set -g window-status-current-format '⮂#[reverse] #I #W #[noreverse]⮀'
|