mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-05 08:58:44 +00:00
140 lines
3.4 KiB
Bash
Executable File
140 lines
3.4 KiB
Bash
Executable File
# ------------------
|
|
# General Settings
|
|
# ------------------
|
|
|
|
# See: https://github.com/gpakosz/.tmux/blob/master/.tmux.conf
|
|
|
|
# Set Custom Prefix
|
|
set -g prefix C-a
|
|
unbind C-b
|
|
|
|
# Start in newer bash
|
|
set-option -g default-command "/usr/local/bin/bash --login"
|
|
|
|
# Disable delay
|
|
set -sg escape-time 1
|
|
|
|
set -g base-index 1 # start windows numbering at 1
|
|
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
|
|
|
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
|
|
setw -q -g utf8 on
|
|
|
|
|
|
# -------------------
|
|
# Visual Settings
|
|
# -------------------
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# Theme
|
|
|
|
TMUX_ACTIVE_COLOR="#3e999f"
|
|
|
|
TMUX_PANE_BORDER_FG="#d6d6d6"
|
|
TMUX_PANE_ACTIVE_BORDER_FG=$TMUX_ACTIVE_COLOR
|
|
|
|
TMUX_MESSAGE_FG=$TMUX_ACTIVE_COLOR
|
|
TMUX_MESSAGE_BG="#d6d6d6"
|
|
|
|
TMUX_STATUS_TEXT_COLOR="#efefef"
|
|
TMUX_STATUS_BG="#26292c"
|
|
|
|
TMUX_PANE_BG=$TMUX_STATUS_TEXT_COLOR
|
|
|
|
TMUX_NAMESPACE_FG=$TMUX_STATUS_TEXT_COLOR
|
|
TMUX_STATUS_RED="#c82829"
|
|
|
|
TMUX_USERNAME_FG=$TMUX_STATUS_TEXT_COLOR
|
|
TMUX_STATUS_ORANGE="#f5871f"
|
|
|
|
# Pane borders
|
|
set -g pane-border-style "fg=$TMUX_PANE_BORDER_FG"
|
|
set -g pane-active-border-style "fg=$TMUX_PANE_ACTIVE_BORDER_FG"
|
|
|
|
# Message in status bar (e.g. Copied successfully)
|
|
# set -g message-style "fg=$TMUX_STATUS_TEXT_COLOR,bg=$TMUX_MESSAGE_BG"
|
|
|
|
# Status bar
|
|
set-option -g status-position bottom
|
|
|
|
# Status mid style
|
|
set -g status-style "fg=white,bg=$TMUX_STATUS_BG"
|
|
|
|
set -g status-left "#[fg=$TMUX_NAMESPACE_FG,bg=$TMUX_STATUS_RED,bold] #S #[fg=$TMUX_STATUS_RED,bg=$TMUX_STATUS_ORANGE,bold]#[fg=$TMUX_USERNAME_FG,bg=$TMUX_STATUS_ORANGE,bold] #(whoami) #[fg=$TMUX_STATUS_ORANGE,bg=$TMUX_STATUS_BG,bold] "
|
|
set -g status-left-length 30
|
|
|
|
set -g status-right "#[fg=$TMUX_STATUS_ORANGE,bg=$TMUX_STATUS_BG,bold]#[fg=$TMUX_NAMESPACE_FG,bg=$TMUX_STATUS_ORANGE,bold] #H #[fg=$TMUX_STATUS_RED,bg=$TMUX_STATUS_ORANGE,bold]#[fg=$TMUX_NAMESPACE_FG,bg=$TMUX_STATUS_RED,bold] #(date +%H:%M) "
|
|
set -g status-right-length 60
|
|
|
|
# window name options
|
|
set -g window-status-format "#[fg=$TMUX_STATUS_TEXT_COLOR,bg=$TMUX_STATUS_BG] #I #W "
|
|
set -g window-status-current-format "#[fg=$TMUX_STATUS_TEXT_COLOR,bg=$TMUX_ACTIVE_COLOR,noreverse,bold] #I #W "
|
|
|
|
|
|
# --------------------
|
|
# Custom keybindings
|
|
# --------------------
|
|
|
|
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' 'copy-mode -e'"
|
|
|
|
|
|
setw -g mode-keys vi
|
|
bind C-a send-prefix
|
|
|
|
# Unbind unused defaults
|
|
unbind %
|
|
unbind [
|
|
unbind p
|
|
|
|
unbind Up
|
|
unbind Down
|
|
unbind Left
|
|
unbind Right
|
|
|
|
unbind M-Up
|
|
unbind M-Down
|
|
unbind M-Left
|
|
unbind M-Right
|
|
|
|
unbind C-Up
|
|
unbind C-Down
|
|
unbind C-Left
|
|
unbind C-Right
|
|
|
|
# Source this file
|
|
bind r source-file ~/.tmux.conf \; display "Config file reloaded!"
|
|
|
|
# Splits
|
|
bind v split-window -h
|
|
bind s split-window -v
|
|
|
|
# split current window horizontally
|
|
bind - split-window -h
|
|
# split current window vertically
|
|
bind _ split-window -v
|
|
|
|
# Move between panes
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# Move between windows
|
|
bind -r C-h select-window -t :-
|
|
bind -r C-l select-window -t :+
|
|
|
|
# Resize panes
|
|
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
|
|
|
|
# Copy & Paste
|
|
bind Escape copy-mode
|
|
bind b list-buffers # list paste buffers
|
|
bind p paste-buffer # paste last buffer
|
|
bind P choose-buffer # see all buffers
|
|
bind C-c run-shell "bash -c 'tmux show-buffer | pbcopy'" \; display 'Copied to clipboard'
|