Created
July 6, 2017 17:17
-
-
Save dingbat/a38956ed4daa34466652c9a0232a4d62 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # switch key bind | |
| set -g prefix C-s | |
| unbind C-b | |
| bind C-s send-prefix | |
| set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/fish" | |
| set -g default-terminal "screen-256color" | |
| set -g default-shell /usr/local/bin/fish | |
| # Status bar | |
| set -g status-fg white | |
| set -g status-bg default | |
| set -g status-justify centre | |
| set -g status-left-length 20 | |
| set -g status-right "#[fg=green]][#[fg=magenta]#(osascript ~/bin/listening_to.scpt) #[fg=cyan]%m/%d #[fg=green]%H:%M]" | |
| set -g status-left "#{prefix_highlight}#[fg=green][#(hostname | awk -F. '{print $1}').#S][" | |
| setw -g window-status-current-format '#[fg=red,bg=default]( #I:#W )#[fg=default]' | |
| setw -g window-status-activity-attr none | |
| setw -g window-status-activity-fg yellow | |
| # 0 is too far from 1 :) | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| # use vi type movements | |
| 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 u previous-window | |
| bind i next-window | |
| is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(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" | |
| # easy to remember splitting | |
| bind \ split-window -h | |
| bind - split-window | |
| # border color | |
| set -g pane-active-border-bg cyan | |
| set -g pane-border-fg cyan | |
| # mouse type things | |
| set-option -g bell-action any | |
| set-option -g visual-bell off | |
| setw -g monitor-activity on | |
| # useful shortcuts | |
| bind r source-file ~/.tmux.conf\; display-message " Config reloaded.." | |
| #bind j command-prompt "join-pane -s :'%%'" | |
| # make copy and paste simmilar to vim | |
| setw -g mode-keys vi | |
| unbind [ | |
| unbind p | |
| bind y copy-mode | |
| bind p paste-buffer | |
| # bind -t vi-copy v begin-selection | |
| # bind -t vi-copy y copy-selection | |
| # plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-copycat' | |
| set -g @plugin 'tmux-plugins/tmux-yank' | |
| set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
| # Initialize TMUX plugin manager | |
| # (keep this line at the very bottom of tmux.conf) | |
| run '~/.tmux/plugins/tpm/tpm' | |
| # clear screen | |
| bind-key K send-keys "clear && tmux clear-history" \; send-keys "Enter" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment