152 lines
4.1 KiB
Bash
152 lines
4.1 KiB
Bash
# Basic Setup ##########################################################################################################
|
|
|
|
set -g default-terminal "screen-256color"
|
|
set -g status-keys vi
|
|
set -g status-interval 2
|
|
set -g status-position top
|
|
set -sg escape-time 0
|
|
|
|
setw -g mode-keys vi
|
|
set -g mouse on
|
|
|
|
set -g base-index 1 # 0 is too far from ` ;)
|
|
|
|
# Automatically set window title
|
|
set-window-option -g automatic-rename on
|
|
set-option -g set-titles on
|
|
|
|
# loud or quiet?
|
|
set-option -g visual-activity off
|
|
set-option -g visual-bell off
|
|
set-option -g visual-silence off
|
|
set-window-option -g monitor-activity off
|
|
set-option -g bell-action none
|
|
|
|
# Keybindings ##########################################################################################################
|
|
|
|
# Remap prefix to Ctrl-A
|
|
set -g prefix C-f
|
|
unbind C-b
|
|
bind C-f send-prefix
|
|
|
|
# Reload config file with prefix-r
|
|
unbind r
|
|
bind-key r source-file ~/.tmux.conf
|
|
|
|
# Add keybindings for pane movement
|
|
unbind-key C-l
|
|
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
bind -n M-h select-pane -L
|
|
bind -n M-j select-pane -D
|
|
bind -n M-k select-pane -U
|
|
bind -n M-l select-pane -R
|
|
|
|
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
|
|
|
|
# Add keybindings for pane resizing
|
|
bind-key J resize-pane -D 5
|
|
bind-key K resize-pane -U 5
|
|
bind-key H resize-pane -L 5
|
|
bind-key L resize-pane -R 5
|
|
|
|
bind-key M-j resize-pane -D
|
|
bind-key M-k resize-pane -U
|
|
bind-key M-h resize-pane -L
|
|
bind-key M-l resize-pane -R
|
|
|
|
# Shift arrow to switch windows
|
|
bind -n S-Left previous-window
|
|
bind -n S-Right next-window
|
|
|
|
# Bindings for history management
|
|
bind-key BSpace send-keys C-l \; clear-history
|
|
|
|
# Bindings for splitting
|
|
bind-key v split-window -h
|
|
bind-key s split-window -v
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# Allow copy-n-paste to system clipboard
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
|
|
|
|
# Custom Resizing
|
|
bind-key v resize-pane -x 126
|
|
bind-key V resize-pane -x 253
|
|
|
|
# Visual Styling #######################################################################################################
|
|
|
|
#
|
|
# Powerline Orange Block - Tmux Theme
|
|
# Created by Jim Myhrberg <[email protected]>.
|
|
#
|
|
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
|
|
#
|
|
# Requires terminal to be using a powerline compatible font, find one here:
|
|
# https://github.com/Lokaltog/powerline-fonts
|
|
#
|
|
|
|
# Status update interval
|
|
set -g status-interval 1
|
|
|
|
# Basic status bar colors
|
|
set -g status-style fg=colour240,bg=colour233
|
|
|
|
# Left side of status bar
|
|
set -g status-left-style bg=colour233,fg=colour243
|
|
set -g status-left-length 40
|
|
set -g status-left "#[fg=colour232,bg=colour130,bold] #S #[fg=colour130,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"
|
|
|
|
# Right side of status bar
|
|
set -g status-right-style bg=colour233,fg=colour243
|
|
set -g status-right-length 150
|
|
set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H "
|
|
|
|
# Window status
|
|
set -g window-status-format " #I:#W#F "
|
|
set -g window-status-current-format " #I:#W#F "
|
|
|
|
# Current window status
|
|
set -g window-status-current-style bg=colour130,fg=colour232
|
|
|
|
# Window with activity status
|
|
set -g window-status-activity-style bg=colour233,fg=colour130
|
|
|
|
# Window separator
|
|
set -g window-status-separator ""
|
|
|
|
# Window status alignment
|
|
set -g status-justify centre
|
|
|
|
# Pane border
|
|
set -g pane-border-style bg=default,fg=colour238
|
|
|
|
# Active pane border
|
|
set -g pane-active-border-style bg=default,fg=colour130
|
|
|
|
# Pane number indicator
|
|
set -g display-panes-colour colour233
|
|
set -g display-panes-active-colour colour245
|
|
|
|
# Clock mode
|
|
set -g clock-mode-colour colour130
|
|
set -g clock-mode-style 24
|
|
|
|
# Message
|
|
set -g message-style bg=colour130,fg=black
|
|
|
|
# Command message
|
|
set -g message-command-style bg=colour233,fg=black
|
|
|
|
# Mode
|
|
set -g mode-style bg=colour130,fg=colour232
|