mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
add tmux configuration
This commit is contained in:
parent
c8391bac4b
commit
5846da2bd7
2 changed files with 64 additions and 1 deletions
63
home/tmux.conf
Normal file
63
home/tmux.conf
Normal file
|
@ -0,0 +1,63 @@
|
|||
# set status bar appearance
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
set -g window-status-current-fg green
|
||||
|
||||
# replace default prefix key
|
||||
set -g prefix C-Space
|
||||
unbind C-b
|
||||
bind C-Space send-prefix
|
||||
|
||||
# use vi-style keybindings
|
||||
# this also makes hitting Enter exit copy-mode, which is a godsend
|
||||
setw -g mode-keys vi
|
||||
|
||||
# remove delay on escape key
|
||||
set -sg escape-time 0
|
||||
|
||||
# automatically set terminal titles (not tmux windows)
|
||||
# TODO: instead of this ugly thing, is there a way to let title codes passthru?
|
||||
set-option -g set-titles on
|
||||
|
||||
# increase scrollback lines from 2000
|
||||
set -g history-limit 10000
|
||||
|
||||
# jump into copy-mode for Shift+PgUp, scroll half a page instead of a full page
|
||||
# switching modes is not ideal but it's the only way to scroll within tmux
|
||||
bind -n S-PgUp copy-mode \; send-keys -X halfpage-up
|
||||
|
||||
# bind Shift+PgUp/PgDn to Do The Right Thing™
|
||||
bind -T copy-mode-vi S-PgUp send-keys -X halfpage-up
|
||||
bind -T copy-mode-vi S-PgDn send-keys -X halfpage-down
|
||||
|
||||
# Ctrl+PgUp/PgDn to navigate windows (like web browsers)
|
||||
bind -n C-PgUp previous-window
|
||||
bind -n C-PgDn next-window
|
||||
|
||||
# Ctrl+Shift+PgUp/PgDn to reorder windows (like web browsers)
|
||||
bind -n C-S-PgUp swap-window -t -1
|
||||
bind -n C-S-PgDn swap-window -t +1
|
||||
|
||||
# Shift+Arrows to switch panes
|
||||
bind -n S-Left select-pane -L
|
||||
bind -n S-Right select-pane -R
|
||||
bind -n S-Up select-pane -U
|
||||
bind -n S-Down select-pane -D
|
||||
|
||||
# Ctrl+Arrows to create panes
|
||||
#bind -n C-Down split-window -v
|
||||
#bind -n C-Up split-window -v -b
|
||||
#bind -n C-Right split-window -h
|
||||
#bind -n C-Left split-window -h -b
|
||||
|
||||
# convenient binds
|
||||
# overrides refresh-clients
|
||||
#bind r source-file ~/.tmux.conf
|
||||
# overrides choose-tree -Zs
|
||||
#bind s split-window -v
|
||||
# doesn't override anything
|
||||
bind v split-window -h
|
||||
# doesn't override anything (assuming prefix key was changed)
|
||||
bind b split-window -v
|
||||
# overrides confirm-before -p "kill-pane #P? (y/n) " kill-pane
|
||||
bind x kill-pane
|
2
install
2
install
|
@ -119,7 +119,7 @@ PATH="${PATH:?No existing PATH}:$rc/sh"
|
|||
backup_dir="$rc/backup-$(date -u '+%s')"
|
||||
|
||||
for f in .bashrc .zshrc .-shrc .arrays .streamcrap .ea .vimrc \
|
||||
.inputrc .Xresources .screenrc; do
|
||||
.inputrc .Xresources .screenrc .tmux.conf; do
|
||||
dotless "$f"
|
||||
r="$rc/home/$REPLY"
|
||||
hardlink "$f" "$r"
|
||||
|
|
Loading…
Add table
Reference in a new issue