# use vi-like shortcuts in various modes
set-window-option -g mode-keys vi
# use ctrl-s as prefix key
set-option -g prefix C-s
unbind-key C-b
bind-key C-s send-prefix
# don't wait for the next character after escape key
set-option -g escape-time 0
# setup default type of terminal
set-option -g default-terminal "tmux-256color"
# show pane numbers for two seconds
set-option -g display-panes-time 2000
# store more of buffer history
set-option -g history-limit 10000
# use vi-line shortcuts to yank text in copy-mode
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'V' send-keys -X select-line
bind-key -T copy-mode-vi '^v' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
# reload config (prefix + r)
bind-key r source ~/.tmux.conf \; display "Configuration reloaded!"
# rebind vertical and horizontal splitting shortcuts
unbind-key %
bind-key | split-window -c "#{pane_current_path}" -h
unbind-key "\""
bind-key - split-window -c "#{pane_current_path}" -v
bind-key c new-window -c "#{pane_current_path}"
# duplicate prefix+n/p keys with prefix+<c-n>/<c-p>
bind-key ^n next-window
bind-key ^p previous-window
# move between panes using prefix + h/j/k/l
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# resize pane using prefix + H/J/K/L
bind-key H resize-pane -L 5
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key L resize-pane -R 5
# toggle between two last visited windows
bind-key ' ' last-window
# configure borders colour scheme
set-option -g pane-border-style "bg=black fg=colour235"
set-option -g pane-active-border-style "bg=colour235 fg=white"
# configure status bar colour scheme
set-window-option -g status-style "bg=colour235 fg=white bold"
set-window-option -g window-status-style "bg=colour235 fg=white"
set-window-option -g window-status-current-style "bg=colour235 fg=colour248 bold reverse"
# configure status bar look
set-option -g status-justify centre
set-option -g status-right '#H | %Y.%m.%d %H:%M '
set-option -g status-right-length 50
# display status bar at the top
set-option -g status-position top
# copy copy-mode selection into primary selection of X
bind-key -T copy-mode-vi c send-keys -X copy-pipe-and-cancel "xsel --primary --input"
# copy copy-mode selection into clipboard of X
bind-key -T copy-mode-vi C send-keys -X copy-pipe-and-cancel "xsel --clipboard --input"
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotfiles
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotfiles
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master