-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
70 lines (52 loc) · 2 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on ## for version 2.3
# set shell
set-option -g default-shell $SHELL
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set-option -g default-terminal "screen-256color"
set-option -g history-limit 30000
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
## UI key binds
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Toggle read-only with <prefix>+o
bind-key o switch-client -r
# switch session with double C-a C-a
# bind-key C-a switch-client -l
# open window and pane at the current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# use vim keys for focus
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# reload
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# resize with arrows
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
#### Status bar ####
set-option -g status on # turn the status bar on
# set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 2 # set update frequencey (default 15 seconds)
set -g status-bg black
set -g status-left-length 20
set -g status-left '#[fg=yellow] #S #W #P #T '
set -g status-right '#(eval /home/athan/BASH/tmux-airline.sh `tmux display -p "#{client_width}"`)'
set -g status-right-length 150
# paste to xsession
# bind-key -t C-c run "tmux show-buffer | xclip -selection clipboard -i"
# bind-key y run "tmux show-buffer | xclip -selection clipboard -i"
bind C-c run "tmux save-buffer - | xclip -i -sel clip"
bind C-v run "tmux set-buffer $(xclip -o -sel clip); tmux paste-buffer"