aboutsummaryrefslogtreecommitdiff
path: root/tmux.conf
blob: b2e90dce484d8cb60f4e6585d8418919b291070b (plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# tmux configuration based on: https://github.com/0xAX/my-dotfiles

#
# Keybindings
#
set -g prefix C-x
bind C-x send-prefix
unbind C-x

unbind C-b
unbind C-a
unbind %
unbind ,
unbind .
unbind n
unbind p
unbind [
unbind '"'
unbind l
unbind &
unbind "'"
unbind w

#
# manage windows
#
bind-key n new-window
bind-key k kill-window
bind-key 2 split-window -h
bind-key 3 split-window

bind -n C-Right  next-window
bind -n C-Left previous-window

#
# manage panes
#
bind-key x kill-pane

bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R

bind -n M-S-Up resize-pane -U
bind -n M-S-Down resize-pane -D
bind -n M-S-Left resize-pane -L
bind -n M-S-Right resize-pane -R

#
# misc
#
set -g history-limit 1500
set -g default-terminal "screen-256color"
set -g bell-action none

set-window-option -g utf8 on

set-window-option -g automatic-rename on
set-option -g set-titles on
setw -g monitor-activity on
set -g base-index 1
setw -g pane-base-index 1

#
# ui
#
set -g status-fg white
set -g status-bg "#283137"

set-window-option -g status-left " #S "
set-window-option -g status-left-fg white
set-window-option -g status-left-bg "#283137"

set-window-option -g status-right " %H:%M %d-%b-%y "
set-window-option -g status-right-fg white
set-window-option -g status-right-bg "#283137"

# active window
set-window-option -g window-status-format "#I: #W"
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg black

# non-active
setw -g window-status-fg "#888879"
setw -g window-status-bg "#283137"

set -g pane-border-fg magenta
set -g pane-active-border-fg white

# coping inside tmux
bind c copy-mode
bind p paste-buffer
# copy from system to tmux
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# copy from tmux to system
bind C-v run-shell "tmux show-buffer | xclip -sel clip -i > /dev/null"