-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
76 lines (59 loc) · 2.1 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
70
71
72
73
74
75
76
# == SUPER TMUX CONFIG OF LIFE ==
# Copied from the amazing **conradho**
# debugging tips:
# "source-file ~/configs/.tmux.conf"
# should try to run above command in tmux to look for errors
# also one way to link ~/.tmux.conf to here is to put that line in the file
# chg the prefix key
set-option -g prefix C-space
unbind-key C-b
# in a remote access, use C-b C-b (twice) to "send prefix" to remote
bind-key C-a send-prefix
# start windows from 1 so it's easier to press
set -g base-index 1
# synchronize panes (type on multiple panes)
# use this to toggle
bind-key m set-window-option synchronize-panes
# keep track of ssh-agent (if u open new shell)
set -g update-environment -r
# make tmux not wait after esc is pressed
set-option -sg escape-time 0
# pretty colors
set -g default-terminal "screen-256color"
# lines of history
set -g history-limit 5000
# vi bindings
set-window-option -g mode-keys vi
bind-key j select-pane -D # Similar to 'C-w j' to navigate windows in Vim
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# enable mouse support for switching panes/windows
# set -g mouse-utf8 on
set -g mouse on
# don't unbind v again because it was assigned previously
bind-key v split-window -h
unbind-key s
bind-key s split-window -v
# bind the Y key in copy mode to send things to clibpooard
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# rename terminals with ctrl+space then ,
set -g set-titles on
set -g set-titles-string '#(whoami) | session: #S'
# the curl command gets your ip address. #S is the session name for tmux
# setup the status bar on the bottom
set -g status-bg blue
set -g status-fg white
set -g status-interval 5
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami) #[default]'
set -g status-right '#[fg=green]#S #[fg=white]%a %d %b %R'
setw -g window-status-format "| #I:#W"
setw -g window-status-current-format "| #[fg=Yellow]#I:#W*"
# preconfigured sessions
bind i source-file ~/.tmux/ide
bind t source-file ~/.tmux/3panes
bind m source-file ~/.tmux/m15y-localdev