mirror of
https://github.com/webgefrickel/dotfiles
synced 2024-11-15 12:12:58 +00:00
98 lines
3.0 KiB
Plaintext
98 lines
3.0 KiB
Plaintext
# Use a 256 color terminal
|
|
set -g default-terminal "screen-256color-italic"
|
|
|
|
# zsh
|
|
set -g default-shell $SHELL
|
|
|
|
# bind default prefix to ctrl-a
|
|
set -g prefix C-a
|
|
unbind-key C-b
|
|
bind-key a send-prefix
|
|
|
|
# more history
|
|
set -g history-limit 10000
|
|
|
|
# Fix for sending keys to Vim
|
|
setw -g xterm-keys on
|
|
|
|
# set esc-timeout to 50ms (better vim)
|
|
set -sg escape-time 50
|
|
|
|
# use vim motions :-)
|
|
setw -g mode-keys vi
|
|
|
|
# Force a reload of te config file
|
|
unbind-key r
|
|
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded!"
|
|
|
|
# Copy & Paste with clipper -- see https://github.com/wincent/clipper
|
|
# starting copy & paste with Ctrl+a [
|
|
bind-key -t vi-copy v begin-selection
|
|
bind-key -t vi-copy y copy-pipe "nc localhost 8377"
|
|
|
|
# Saner window splitting / new windows
|
|
bind-key \ split-window -h -c "#{pane_current_path}"
|
|
bind-key - split-window -v -c "#{pane_current_path}"
|
|
bind-key c new-window -c "#{pane_current_path}"
|
|
|
|
# Easier resizing
|
|
unbind-key -n C-j
|
|
unbind-key -n C-k
|
|
unbind-key -n C-h
|
|
unbind-key -n C-l
|
|
bind-key -r C-j resize-pane -D
|
|
bind-key -r C-k resize-pane -U
|
|
bind-key -r C-h resize-pane -L
|
|
bind-key -r C-l resize-pane -R
|
|
|
|
|
|
# Smart pane switching with awareness of vim splits
|
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
|
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
|
|
|
|
|
# Mouse support
|
|
set -g mode-mouse on
|
|
set -g mouse-select-pane on
|
|
set -g mouse-select-window on
|
|
set -g mouse-resize-pane on
|
|
|
|
# counting panes starts at 1
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# How long should we show any messages?
|
|
set -g display-time 2000
|
|
|
|
|
|
# statusbar colors solarized dark
|
|
set -g status-bg black
|
|
set -g status-fg yellow
|
|
set -g status-attr default
|
|
set -g pane-border-fg black
|
|
set -g pane-active-border-fg brightgreen
|
|
set -g message-bg black
|
|
set -g message-fg brightred
|
|
set -g display-panes-active-colour blue
|
|
set -g display-panes-colour brightred
|
|
setw -g window-status-fg brightblue
|
|
setw -g window-status-bg default
|
|
setw -g window-status-current-fg brightred
|
|
setw -g window-status-current-bg default
|
|
setw -g clock-mode-colour green
|
|
|
|
# Custom status bar - with Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
|
|
set -g status-left-length 32
|
|
set -g status-right-length 150
|
|
set -g status-interval 5
|
|
set -g status-left-length 60
|
|
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] ⣿ #P #[fg=colour238,bg=default,nobold]⮀'
|
|
set -g status-right '#[fg=colour238,bg=default,nobold]⮂#[fg=colour245,bg=colour238] #(whoami)@#h #[fg=colour252]⮂#[fg=colour235,bg=colour252,bold] ○ #(date +"%H:%M") '
|
|
set -g window-status-format "#[fg=base0,bg=default] #I #W "
|
|
set -g window-status-current-format "#[fg=black,bg=brightred]⮀#[fg=colour251,bg=brightred,noreverse,bold] #I ⮁ #W #[fg=brightred,bg=black,nobold]⮀"
|
|
|