-
-
Save spezifisch/41fbbb05dd1ebb767936ee9dea35d980 to your computer and use it in GitHub Desktop.
A better starting tmux config. Live like screen, but better
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
| # based on https://gist.github.com/brianredbeard/8963552 | |
| # make CTRL+a the 'prefix' ala screen. | |
| bind C-a send-prefix | |
| set -g prefix C-a | |
| # get rid of the tmux standard of CTRL+b | |
| unbind C-b | |
| # 0-based indices | |
| set -g base-index 0 | |
| setw -g pane-base-index 0 | |
| # make it easy to reload the config (CTRL+r) | |
| bind r source-file ~/.tmux.conf \; display "Config reloaded!" | |
| # HA! SEE THIS SCREEN? WE CAN SPLIT BOTH WAYS WITHOUT BREAKING VERSIONS. | |
| bind | split-window -h | |
| bind - split-window -v | |
| # and it was said... GIVE ME VI BINDINGS | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| bind -r C-h select-window -t :- | |
| bind -r C-l select-window -t :+ | |
| # make it bigger, make it smaller | |
| bind -r H resize-pane -L 5 | |
| bind -r J resize-pane -D 5 | |
| bind -r K resize-pane -U 5 | |
| bind -r L resize-pane -R 5 | |
| # pane border colors | |
| set -g pane-border-style fg=colour245,bg=black | |
| set -g pane-active-border-style fg=black,bg=colour245 | |
| # no more front and back, side to side. keep it centered. | |
| set -g status-justify centre | |
| # monitor but don't notify about activity | |
| setw -g monitor-activity on | |
| set -g visual-activity off | |
| # based on https://gist.github.com/spicycode/1229612 | |
| set -g status-style fg=white,bg=colour235 | |
| set -g window-status-style fg=white,bg=colour235 | |
| set -g window-status-current-style fg=colour235,bg=white,bold | |
| set-window-option -g window-status-current-format "\ | |
| #[fg=colour237, bg=green]\ | |
| #[fg=colour236] #I*│\ | |
| #[bold] #W " | |
| set-window-option -g window-status-format "\ | |
| #[bg=colour239,noitalics]\ | |
| #I #[fg=colour246]│#[fg=default] #W " | |
| set -g status-interval 5 | |
| set -g status-left-length 30 | |
| set -g status-left '#[fg=green]#(whoami)@#H/#S#[default]' | |
| if-shell 'test -n "$SSH_CLIENT"' \ "set -g status-left '#[fg=red][ssh #[fg=green]#(whoami)@#H/#S #[fg=red]]#[default]'" | |
| set -g status-right '#[fg=green]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%Y-%m-%d %H:%M#[default]' | |
| # No delay for escape key press | |
| set -sg escape-time 0 | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment