mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 00:05:10 +01:00
Other config: still 256 colour, but now doesn't steal the mouse, features an airline-like statusbar, uses ctrl+a and some other things
This commit is contained in:
116
.tmux.conf
116
.tmux.conf
@@ -1,64 +1,74 @@
|
|||||||
#### COLOUR (Solarized 256)
|
# Ring the bell if any background window rang a bell
|
||||||
|
set -g bell-action any
|
||||||
|
|
||||||
# default statusbar colors
|
# Default termtype. If the rcfile sets $TERM, that overrides this value.
|
||||||
set-option -g status-bg colour235 #base02
|
set -g default-terminal screen-256color
|
||||||
set-option -g status-fg colour136 #yellow
|
|
||||||
set-option -g status-attr default
|
|
||||||
|
|
||||||
# default window title colors
|
# Keep your finger on ctrl, or don't
|
||||||
set-window-option -g window-status-fg colour244 #base0
|
bind-key ^D detach-client
|
||||||
set-window-option -g window-status-bg default
|
|
||||||
#set-window-option -g window-status-attr dim
|
|
||||||
|
|
||||||
# active window title colors
|
# Create splits and vertical splits
|
||||||
set-window-option -g window-status-current-fg colour166 #orange
|
bind-key v split-window -h
|
||||||
set-window-option -g window-status-current-bg default
|
bind-key ^V split-window -h
|
||||||
#set-window-option -g window-status-current-attr bright
|
bind-key s split-window
|
||||||
|
bind-key ^S split-window
|
||||||
|
|
||||||
# pane border
|
# Pane resize in all four directions using vi bindings.
|
||||||
set-option -g pane-border-fg colour235 #base02
|
# Can use these raw but I map them to shift-ctrl-<h,j,k,l> in iTerm.
|
||||||
set-option -g pane-active-border-fg colour240 #base01
|
bind-key J resize-pane -D
|
||||||
|
bind-key K resize-pane -U
|
||||||
|
bind-key H resize-pane -L
|
||||||
|
bind-key L resize-pane -R
|
||||||
|
|
||||||
# message text
|
# Use vi keybindings for tmux commandline input.
|
||||||
set-option -g message-bg colour235 #base02
|
# Note that to get command mode you need to hit ESC twice...
|
||||||
set-option -g message-fg colour166 #orange
|
set -g status-keys vi
|
||||||
|
|
||||||
# pane number display
|
# Use vi keybindings in copy and choice modes
|
||||||
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
|
|
||||||
|
|
||||||
# improve colors
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
# remove administrative debris (session name, hostname, time) in status bar
|
|
||||||
#set -g status-left ''
|
|
||||||
#set -g status-right ''
|
|
||||||
|
|
||||||
# act like vim
|
|
||||||
setw -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 :+
|
|
||||||
|
|
||||||
# mouse behaviour
|
# easily toggle synchronization (mnemonic: e is for echo)
|
||||||
set -g mode-mouse on
|
# sends input to all panes in a given window.
|
||||||
set -g mouse-select-pane on
|
bind e setw synchronize-panes on
|
||||||
set -g mouse-resize-pane on
|
bind E setw synchronize-panes off
|
||||||
set -g mouse-select-window on
|
|
||||||
|
|
||||||
# Make copy-paste work
|
# set first window to index 1 (not 0) to map more to the keyboard layout...
|
||||||
#set -g default-command "reattach-to-user-namespace -l bash"
|
set-option -g base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
|
||||||
# Setup 'v' to begin selection as in Vim
|
# color scheme (styled as vim-powerline)
|
||||||
bind-key -t vi-copy v begin-selection
|
set -g status-left-length 52
|
||||||
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
set -g status-right-length 451
|
||||||
|
set -g status-fg white
|
||||||
|
set -g status-bg colour234
|
||||||
|
set -g pane-border-fg colour245
|
||||||
|
set -g pane-active-border-fg colour39
|
||||||
|
set -g message-fg colour16
|
||||||
|
set -g message-bg colour221
|
||||||
|
set -g message-attr bold
|
||||||
|
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
|
||||||
|
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
|
||||||
|
set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
|
||||||
|
#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
|
||||||
|
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]"
|
||||||
|
|
||||||
# Update default binding of `Enter` to also use copy-pipe
|
# Patch for OS X pbpaste and pbcopy under tmux.
|
||||||
unbind -t vi-copy Enter
|
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
|
||||||
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
|
||||||
|
# Screen like binding
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-a
|
||||||
|
bind a send-prefix
|
||||||
|
|
||||||
|
# No escape time for vi mode
|
||||||
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
# Screen like binding for last window
|
||||||
|
unbind l
|
||||||
|
bind C-a last-window
|
||||||
|
|
||||||
|
# Bigger history
|
||||||
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
# Local config
|
||||||
|
if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user'
|
||||||
|
|||||||
Reference in New Issue
Block a user