Last active
June 26, 2018 22:45
-
-
Save khale/0d7f8b2e24bb874a1008f894716f16df to your computer and use it in GitHub Desktop.
Tmux config
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
set-option -g prefix C-q | |
# for nested tmux sessions | |
bind-key q send-prefix | |
# default 256 color | |
set -g default-terminal "screen-256color" | |
# fixes issues scrolling with shift-PageUp/Down | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# faster command sequences | |
set -s escape-time 0 | |
# VIM-style bindings between panes | |
unbind j | |
unbind k | |
unbind h | |
unbind l | |
bind j select-pane -D | |
bind k select-pane -U | |
bind h select-pane -L | |
bind l select-pane -R | |
bind \ split-window -h | |
bind - split-window -v | |
setw -g mode-keys vi | |
# tab to enter copy-mode | |
unbind [ | |
bind Tab copy-mode | |
# v to select | |
if-shell -b '["$(echo "$TMUX_VERSION >= 2.4" | bc)" = 1]' \ | |
'bind -T copy-mode-vi v send-keys -X begin-selection; \ | |
bind-key -T copy-mode-vi y send-keys -X copy-selection;' | |
# y to yank | |
# P to paste | |
unbind P | |
bind P paste-buffer | |
# open man page with / | |
bind / command-prompt "split-window -h 'exec man %%'" | |
unbind * | |
bind * list-clients | |
# faster re-sourcing | |
bind r source-file ~/.tmux.conf \; display-message " Config reloaded..." | |
# RESIZING | |
# | |
# when multiple clients are connected: | |
# only resize window when smallest client | |
# is *actively* looking at the screen | |
setw -g aggressive-resize on | |
unbind Left | |
unbind Right | |
unbind Down | |
unbind Up | |
bind -r Left resize-pane -L 2 | |
bind -r Right resize-pane -R 2 | |
bind -r Down resize-pane -D 2 | |
bind -r Up resize-pane -U 2 | |
# Commands. | |
#bind C-a last-window | |
unbind % | |
bind | split-window -h | |
bind _ split-window -v | |
# Status bar tweaks. | |
#set-option -g status-bg blue | |
#set-option -g status-fg black | |
#set-option -g message-bg cyan | |
#set-option -g message-fg white | |
#set -g default-terminal "screen-256color" | |
# This is necessary if you want to be able to type immediately after switching | |
# panes. | |
set-option -g repeat-time 0 | |
# tmux-powerline | |
set-option -g status on | |
set-option -g status-interval 2 | |
set-option -g status-justify "centre" | |
set-option -g status-left-length 60 | |
set-option -g status-right-length 120 | |
set-option -g status-left "#(~/configs/tmux-powerline/status-left.sh)" | |
set-option -g status-right "#(~/configs/tmux-powerline/status-right.sh)" | |
# Solarize | |
#### COLOUR | |
# default statusbar colors | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour244 | |
set-window-option -g window-status-bg default | |
#set-window-option -g window-status-attr dim | |
# active window title colors | |
set-window-option -g window-status-current-fg colour166 #orange | |
set-window-option -g window-status-current-bg default | |
#set-window-option -g window-status-current-attr bright | |
# pane border | |
set-option -g pane-border-fg colour235 #base02 | |
set-option -g pane-active-border-fg colour240 #base01 | |
# message text | |
set-option -g message-bg colour235 #base02 | |
set-option -g message-fg colour166 #orange | |
# pane number display | |
set-option -g display-panes-active-colour colour33 #blue | |
set-option -g display-panes-colour colour166 #orange | |
# clock | |
set-window-option -g clock-mode-colour colour64 #green | |
#history | |
set-option -g history-limit 10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment