diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..10a0d7b --- /dev/null +++ b/tmux.conf @@ -0,0 +1,98 @@ +# unbind default prefix and set it to Ctrl+a +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +# make delay shorter +set -sg escape-time 0 + +# make window/pane index start with 1 +set -g base-index 1 +setw -g pane-base-index 1 + +###################### +#### Key Bindings #### +###################### + +# reload config file +bind r source-file ~/.tmux.conf \; display "Config Reloaded!" + +# split window +bind | split-window -h +bind - split-window -v + +# pane movement shortcuts +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 :+ + +# Resize pane shortcuts +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 + +# enable mouse mode +setw -g mode-mouse on +set -g mouse-select-pane on +set -g mouse-resize-pane on +set -g mouse-select-window on + +# tmux display things in 256 colors +set -g default-terminal "screen-256color" + +# maximizing and restoring windows +unbind Up +bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen +unbind Down +bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen + +###################### +### Color Settings ### +###################### + +#### COLOUR + +# default statusbar colors +set-option -g status-bg colour235 #base02 +set-option -g status-fg colour51 #blue +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 colour51 #blue +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 colour51 #blue + +# 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 + +# set vi mode for copy mode +setw -g mode-keys vi +# more settings to make copy-mode more vim-like +unbind [ +bind Escape copy-mode +unbind p +bind p paste-buffer +bind -t vi-copy 'v' begin-selection +bind -t vi-copy 'y' copy-selection