Created
April 26, 2020 11:28
-
-
Save RowanFeely/29c37cd2afe6d0efb09114241eb00670 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
# ██████████ ████ ████ ██ ██ ██ ██ | |
# ░░░░░██░░░ ░██░██ ██░██░██ ░██░░██ ██ | |
# ░██ ░██░░██ ██ ░██░██ ░██ ░░██ ██ | |
# ░██ ░██ ░░███ ░██░██ ░██ ░░███ | |
# ░██ ░██ ░░█ ░██░██ ░██ ██░██ | |
# ░██ ░██ ░ ░██░██ ░██ ██ ░░██ | |
# ░██ ░██ ░██░░███████ ██ ░░██ | |
# ░░ ░░ ░░ ░░░░░░░ ░░ ░░ | |
# | |
# ▓▓▓▓▓▓▓▓▓▓ | |
# ░▓ author ▓ xero <[email protected]> | |
# ░▓ code ▓ http://code.xero.nu/dotfiles | |
# ░▓ mirror ▓ http://git.io/.files | |
# ░▓▓▓▓▓▓▓▓▓▓ | |
# ░░░░░░░░░░ | |
# shell | |
set -g default-command /bin/zsh | |
set -g default-shell /bin/zsh | |
# screen mode | |
set -g default-terminal "screen-256color" | |
set-option -ga terminal-overrides ",xterm-256color:Tc" | |
# start with window 1 (instead of 0) | |
set -g base-index 1 | |
# renumber windows after closing | |
set -g renumber-windows on | |
# start with pane 1 | |
set -g pane-base-index 1 | |
# remove esc delay | |
set -sg escape-time 0 | |
# history | |
set -g history-limit 10000 | |
# allow terminal scrolling | |
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# use vi mode | |
setw -g mode-keys vi | |
set -g status-keys vi | |
# pleb mode | |
set -g mouse on | |
# panes | |
set -g pane-border-style "fg=colour0" | |
set -g pane-active-border-style "fg=colour0" | |
#set -g window-active-style 'bg=colour236' | |
#set -g window-style 'bg=black' | |
# status line | |
set -g status-justify left | |
set -g status-style "bg=colour0,fg=colour14" | |
set -g status-interval 2 | |
# messaging | |
set -g message-style "bg=colour14,fg=colour0" | |
set -g message-command-style "bg=colour1,fg=colour14" | |
# window mode | |
setw -g mode-style "bg=colour14,fg=colour0" | |
# split sytle | |
set -g pane-border-style "bg=colour0,fg=colour0" | |
set -g pane-active-border-style "bg=colour0,fg=colour0" | |
#resizing | |
setw -g aggressive-resize on | |
# window status | |
set-option -g status-position bottom | |
setw -g window-status-format "#[fg=colour246,bg=colour0,reverse] #W ░▓█" | |
setw -g window-status-current-format "#[fg=colour6,bg=colour0,reverse] #W ░▓█" | |
# info on right | |
set -g status-right-length 100 | |
set -g status-right '#(~/bin/tmux-status)' | |
# info on left (no session display) | |
set -g status-left '' | |
# loud or quiet? | |
set-option -g visual-activity on | |
set-option -g visual-bell off | |
set-option -g visual-silence off | |
set-window-option -g monitor-activity off | |
set-option -g bell-action none | |
# tmux clock | |
#set -g lock-after-time 300 | |
set -g clock-mode-colour colour14 | |
set -g lock-command "unimatrix -a -f -o -s 97 -l kssss" | |
# set -g lock-command "~/bin/pipes" | |
# shift shortcuts for windows | |
bind-key -n S-Up set-option -g status | |
bind-key -n S-Down set-option -g status | |
bind-key -n S-Left previous-window | |
bind-key -n S-Right next-window | |
# change prefix to backtick | |
unbind C-b | |
set-option -g prefix ` | |
bind ` send-prefix | |
# vim style copy paste mode | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind-key -Tcopy-mode-vi 'v' send -X begin-selection | |
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' | |
# splitting | |
unbind % | |
bind h split-window -v | |
unbind '"' | |
bind v split-window -h | |
# navigate and resize splits | |
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | |
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?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 M-h if-shell "$is_vim" "send-keys M-h" "resize-pane -L 2" | |
bind -n M-l if-shell "$is_vim" "send-keys M-l" "resize-pane -R 2" | |
bind -n M-k if-shell "$is_vim" "send-keys M-k" "resize-pane -U 2" | |
bind -n M-j if-shell "$is_vim" "send-keys M-j" "resize-pane -D 2" | |
# zoom split | |
unbind z | |
bind z if-shell "$is_vim" "send-keys ,z" "resize-pane -Z" | |
bind Z resize-pane -Z | |
# vim style commands | |
bind : command-prompt | |
# source config file | |
bind r source-file ~/.tmux.conf \; display-message "█▓░ ~/.tmux.conf reloaded." | |
# other random key-binding changes | |
bind x kill-pane | |
bind t set status | |
bind a set-window-option synchronize-panes \; display-message "█▓░ synchronize" | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-cpu' | |
set -g @plugin 'xamut/tmux-spotify' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment