Created
November 15, 2017 21:40
-
-
Save kdheepak/5aeeb0d88a08c88fe652902c75f3e369 to your computer and use it in GitHub Desktop.
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
# Change prefix key to ` | |
unbind C-b | |
set -g prefix ` | |
bind-key ` send-prefix | |
bind-key C-a set-option -g prefix C-a | |
bind-key C-b set-option -g prefix ` | |
# we might need ` at some point, allow switching | |
bind-key C-a set-option -g prefix C-a | |
bind-key C-b set-option -g prefix ` | |
setw -g monitor-activity on | |
set -g visual-activity on | |
set-window-option -g window-status-current-bg yellow | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# Keep your finger on ctrl, or don't | |
bind-key ^D detach-client | |
# Smart pane switching with awareness of vim splits. | |
# Source: https://github.com/christoomey/vim-tmux-navigator | |
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" | |
# No escape time for vi mode | |
set -sg escape-time 0 | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
#set -g default-terminal "xterm-256color" | |
set -g default-terminal "screen-256color" | |
# export TERM=xterm-256color | |
# Bigger history | |
set -g history-limit 10000 | |
# New windows/pane in $PWD | |
bind c new-window -c "#{pane_current_path}" | |
set-option -g allow-rename off | |
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' | |
# Bad Wolf by Steve Losh | |
# Modified by Dheepak Krishnamurthy | |
# ===================== | |
set -g status-fg white | |
set -g status-bg colour234 | |
# set -g status-bg default #set for transparent background | |
set -g window-status-activity-attr bold | |
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 | |
# Custom status bar | |
# Powerline | |
set -g status-left-length 32 | |
set -g status-right-length 150 | |
set -g status-interval 5 | |
# Lets add the current weather to our status bar—why? Well Why the french-toast not? | |
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour238,nobold]#[fg=colour15,bg=colour238,bold] #(weathermajig boulder --short) #[fg=colour238,bg=colour234,nobold]' | |
set -g status-right '%R #[fg=colour238,nobold]#[fg=colour254, bg=colour238] %d %b #(tmux-spotify-info)#[fg=colour254,nobold]#[fg=colour16,bg=colour254,bold] #h ' | |
set -g window-status-format "#[fg=white,bg=colour234] #I #W " | |
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour16,bg=colour39,noreverse,bold] #I ❭ #W #[fg=colour39,bg=colour234,nobold]" | |
set-option -g mouse on | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'nhdaly/tmux-better-mouse-mode' | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
# Other examples: | |
# set -g @plugin 'github_username/plugin_name' | |
# set -g @plugin 'git@github.com/user/plugin' | |
# set -g @plugin 'git@bitbucket.com/user/plugin' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment