Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Snow
committed
Mar 7, 2019
1 parent
cf57ca5
commit 6bd97b0
Showing
2 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
.vim | ||
.tmux | ||
.tmux.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# General | ||
set -g prefix C-a # prefix key | ||
set -g default-terminal "screen-256color" # terminal type | ||
set -g aggressive-resize on # aggressive resize | ||
set -sg escape-time 10 # escape time | ||
set -g base-index 1 # set initial window index to 1 | ||
set -g mouse on # enable mouse support | ||
set -g bell-action none # disable bell | ||
setw -g xterm-keys on # enable xterm keys | ||
setw -g mode-keys vi # enable vi mode keys | ||
|
||
# Status Bar | ||
set -g status-interval 1 | ||
set -g status-right-length 120 | ||
set -g status-right '#(date +"%b %_d %H:%M") | #(whoami)@#(hostname -s)' | ||
|
||
# Key Bindings | ||
bind _ split-window -h -c "#{pane_current_path}" # split horizontally | ||
bind - split-window -v -c "#{pane_current_path}" # split vertically | ||
bind b break-pane # send pane to new window | ||
bind k kill-pane # kill pane without confirmation | ||
bind x confirm kill-window # kill window | ||
bind q confirm kill-session # kill session | ||
bind r source-file ~/.tmux.conf # reload config | ||
|
||
bind -n S-Left previous-window | ||
bind -n S-Right next-window | ||
|
||
bind -n M-S-Left resize-pane -L 5 | ||
bind -n M-S-Right resize-pane -R 5 | ||
bind -n M-S-Down resize-pane -D 5 | ||
bind -n M-S-Up resize-pane -U 5 | ||
|
||
# vim-like Copy & Paste | ||
bind Escape copy-mode | ||
bind v copy-mode | ||
bind P paste-buffer | ||
bind -T copy-mode-vi v send -X begin-selection | ||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" | ||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" | ||
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" | ||
|
||
# Status bar red in SSH | ||
if-shell 'test "$SSH_CONNECTION"' 'set -g status-bg red' | ||
|
||
black='colour16' | ||
white='colour255' | ||
gray='colour236' | ||
dark_gray='colour236' | ||
yellow='colour215' | ||
light_purple='colour141' | ||
dark_purple='colour61' | ||
|
||
## Icons | ||
left_sep='' | ||
right_sep='' | ||
right_alt_sep='' | ||
|
||
set-option -g status on | ||
set-option -g status-left-length 100 | ||
set-option -g status-right-length 100 | ||
set-option -g status-bg "${dark_gray}" | ||
set-option -g pane-active-border-fg "${dark_purple}" | ||
set-option -g pane-border-fg "${gray}" | ||
set-option -g message-bg "${gray}" | ||
set-option -g message-fg "${white}" | ||
set-option -g message-command-bg "${gray}" | ||
set-option -g message-command-fg "${white}" | ||
set-option -g status-left " #I #[fg=${dark_gray},reverse]${right_sep} " | ||
set-option -g status-left-style "fg=${white},bg=${dark_purple},bold" | ||
set-option -g status-right "${left_sep}#[bg=${black},reverse] %Y-%m-%d %H:%M " | ||
set-option -g status-right-style "fg=${light_purple},bg=${dark_gray}" | ||
set-window-option -g window-status-activity-style "fg=${white},bg=${gray}" | ||
set-window-option -g window-status-separator '' | ||
set-window-option -g window-status-format ' #I #W ' | ||
set-window-option -g window-status-style "fg=${yellow},bg=${dark_gray}" | ||
set-window-option -g window-status-current-format \ | ||
"${right_sep}#[fg=${black}] #I ${right_alt_sep} #W #[fg=${dark_gray},reverse]${right_sep}" | ||
set-window-option -g window-status-current-style "fg=${dark_gray},bg=${light_purple}" | ||
|