-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·55 lines (42 loc) · 1.75 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# required to make color PS1 and bash aliases and fns work.
# Presumably without this tmux wasn't starting interactive shells?
# Also reqd: .profile now sources .bashrc for interactive shells.
set-option -g default-command $SHELL
# c-b c-b for last active window
bind-key C-b last-window
# better mnemonic for horizontal and vertical splits
bind | split-window -h
bind - split-window -v
# update layout when creating/destroying panes
bind-key -n M-c kill-pane \; select-layout
bind-key -n M-n split-window \; select-layout
# Commented out. Gives errors in ubuntu19.04, snap tmux 2.3 2017-05-17(11)
# mouse scrolling
set -g mouse on
# clicking a window name in status line will select it
# set -g mouse-select-window on
# clicking a pane will select it
# set -g mouse-select-pane on
# drag edges to resize panes
# set -g mouse-resize-pane on
# start numbering windows at 1 - easier to each than 0
set -g base-index 1
# 256 color terminal
set -g default-terminal "screen-256color"
# Set status bar
set -g status-bg colour8
set -g status-fg black
# set -g status-left ""
# set -g status-right "#[fg=green]#H"
# only contrain windows in size if a smaller client is actively looking at it
# setw -g aggressive-resize on
# Faster Command Sequences Upon starting to use tmux, I noticed that I had to
# add a noticeable delay between two characters in a command sequence for it to
# recognize the command, for example between the C-a and n in C-a n. This is
# because tmux is waiting for an escape sequence. Fix that by setting escape
# time to zero.
# set -s escape-time 0
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-y run "tmux show-buffer | xclip -selection clipboard -i"