Custom status bar and more vim bindings
This commit is contained in:
parent
d6ad7ba856
commit
ec37081f9f
131
tmux.conf
131
tmux.conf
|
@ -1,27 +1,85 @@
|
|||
## Behavior ####################
|
||||
|
||||
# go zsh, go
|
||||
set-option -g default-shell $SHELL
|
||||
|
||||
# set utf-8
|
||||
set-window-option -g utf8 on
|
||||
set -g status-utf8 on
|
||||
|
||||
# look good
|
||||
## Behavior ###############
|
||||
# set correct Term
|
||||
set-option -g default-terminal "screen-256color"
|
||||
|
||||
# Zero-based indexing is fine in programming languages, but not so much in
|
||||
# a multiplexer when zero is on the other side of the keyboard.
|
||||
set -g base-index 1
|
||||
set -g renumber-windows on
|
||||
setw -g automatic-rename on
|
||||
|
||||
# Remove the <C-a> delay
|
||||
set -s escape-time 0
|
||||
|
||||
# Rather than constraining window size to the maximum size of any client
|
||||
# connected to the *session*, constrain window size to the maximum size of any
|
||||
# client connected to *that window*. Much more reasonable.
|
||||
setw -g aggressive-resize on
|
||||
|
||||
# go zsh, go
|
||||
set-option -g default-shell $SHELL
|
||||
# share clipboard
|
||||
set-option -g default-command "/usr/local/bin/reattach-to-user-namespace -l $SHELL"
|
||||
|
||||
|
||||
## Key bindings ###########
|
||||
# Remap the key prefix
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
|
||||
# Go to last active window
|
||||
bind-key C-a last-window
|
||||
|
||||
# reload config without killing server
|
||||
bind R source-file ~/.tmux.conf \; display-message " Config reloaded..".
|
||||
|
||||
# Better splitting keybinds
|
||||
unbind %
|
||||
bind H split-window -v
|
||||
unbind '"'
|
||||
bind V split-window -h
|
||||
|
||||
# set vi keys
|
||||
setw -g mode-keys vi
|
||||
unbind [
|
||||
bind Escape copy-mode
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
bind-key -t vi-copy 'v' begin-selection
|
||||
bind-key -t vi-copy 'y' copy-selection
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind-key -r C-h select-window -t :-
|
||||
bind-key -r C-l select-window -t :+
|
||||
|
||||
# after copying to a tmux buffer, hit y again to copy to clipboard
|
||||
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|
||||
|
||||
# pane selection
|
||||
bind Left select-pane -L
|
||||
bind Right select-pane -R
|
||||
bind Up select-pane -U
|
||||
bind Down select-pane -D#
|
||||
|
||||
# quick view of processes
|
||||
bind '~' split-window "exec top"
|
||||
|
||||
# Cycling through windows
|
||||
bind-key -n C-right next
|
||||
bind-key -n C-left prev
|
||||
|
||||
# a mouse
|
||||
set -g mode-mouse on
|
||||
setw -g mouse-select-window on
|
||||
setw -g mouse-select-pane on
|
||||
|
||||
|
||||
## Looks ########################
|
||||
|
||||
#### COLOUR (Solarized dark)
|
||||
|
||||
# default statusbar colors
|
||||
set-option -g status-bg colour234
|
||||
set-option -g status-fg yellow #yellow
|
||||
|
@ -30,12 +88,12 @@ set-option -g status-attr default
|
|||
# default window title colors
|
||||
set-window-option -g window-status-fg brightblue #base0
|
||||
set-window-option -g window-status-bg default
|
||||
#set-window-option -g window-status-attr dim
|
||||
set-window-option -g window-status-attr dim
|
||||
|
||||
# active window title colors
|
||||
set-window-option -g window-status-current-fg brightred #orange
|
||||
set-window-option -g window-status-current-bg default
|
||||
#set-window-option -g window-status-current-attr bright
|
||||
set-window-option -g window-status-current-attr bright
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-fg black #base02
|
||||
|
@ -52,44 +110,13 @@ set-option -g display-panes-colour brightred #orange
|
|||
# clock
|
||||
set-window-option -g clock-mode-colour green #green
|
||||
|
||||
# Rather than constraining window size to the maximum size of any client
|
||||
# connected to the *session*, constrain window size to the maximum size of any
|
||||
# client connected to *that window*. Much more reasonable.
|
||||
setw -g aggressive-resize on
|
||||
|
||||
|
||||
## Controls #####################
|
||||
## Status bar ###################
|
||||
#
|
||||
set -g status-attr bright
|
||||
set -g status-right-length 40
|
||||
set -g status-left-length 40
|
||||
|
||||
# Remap the key prefix
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
|
||||
# Go to last active window
|
||||
bind-key C-a last-window
|
||||
|
||||
# share clipboard
|
||||
set-option -g default-command "/usr/local/bin/reattach-to-user-namespace -l $SHELL"
|
||||
|
||||
# a mouse
|
||||
set -g mode-mouse on
|
||||
setw -g mouse-select-window on
|
||||
setw -g mouse-select-pane on
|
||||
|
||||
# act like vim
|
||||
set-window-option -g mode-keys vi
|
||||
setw -g mode-keys vi
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind-key -r C-h select-window -t :-
|
||||
bind-key -r C-l select-window -t :+
|
||||
unbind [
|
||||
bind ` copy-mode
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
bind -t vi-copy v begin-selection
|
||||
bind -t vi-copy y copy-selection
|
||||
|
||||
# after copying to a tmux buffer, hit y again to copy to clipboard
|
||||
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|
||||
set -g status-left '#[fg=blue]#H#[fg=white,bright] #[default]'
|
||||
set -g status-right '#[fg=cyan] #(tmuxup) #[fg=white,bright]• #[fg=magenta]#(cut -d " " -f1-3 /proc/loadavg)'
|
||||
|
|
Loading…
Reference in a new issue