aboutsummaryrefslogtreecommitdiff
path: root/.config/tmux/conf
blob: 2107a2885bdf9326fb9baca4ca65101f8e4e6ef1 (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
98
99
100
101
102
103
# global configuartion settings
set -g default-terminal "screen-256color"
set -g xterm-keys on
set -g history-limit 15000

# unbind some defaults
unbind-key [
unbind-key v
unbind-key y
unbind-key C-b

set -sg escape-time     0
set -g  status-interval 1

# setup vi-mode
setw -g mode-keys vi

bind p      paste-buffer
bind Escape copy-mode

#bind -t vi-copy 'v'   begin-selection
#bind -t vi-copy 'y'   copy-selection
#bind -t vi-copy 'C-v' rectangle-toggle

# ^a
set -g prefix C-a
bind-key C-a send-prefix

# add other exotic keybinds
bind [ previous-window
bind ] next-window

# remove all annoying lines
set -g visual-bell off
set -g visual-activity off

# move statusbar to top
set -g status-position top

# recolor the messagebar/commandprompt
set -g message-style fg=colour110
set -g message-style bg=colour233

# set the statusbar styles
set -g window-status-format         "#[fg=colour7]#I"
set -g window-status-current-format "#[bg=colour12 fg=colour15] #I #[fg=colour16]"

set -g  status-left                 "#[#{?client_prefix,fg=colour16,fg=colour13}]"
set -ag status-left                 "#[#{?client_prefix,bg=colour13,bg=colour16}]"
set -ag status-left                 " #S #[bg=colour8] "

set -g  status-right                "#[fg=colour7,bg=colour16]"
set -ag status-right                "#(~/.config/tmux/status-right.pl)"
set -ag status-right                "#[fg=colour7,bg=colour16] #(date '+%Y-%m-%d %H:%M') "

set -g  status-left-length          15
set -g  status-right-length         70

set -g  status-bg                   "colour8"

set -wg window-status-bell-style fg=default
set -wg window-status-bell-style bg=default
set -wg window-status-bell-style bold

# start counting at 1 instead of 0
set -g base-index       1
set -g pane-base-index  1
set -g renumber-windows on

# set wm window titles
set -g set-titles        on
set -g set-titles-string "#T ยป #{pane_current_command}"

# pane border coloring
set -g pane-border-style        fg=colour234
set -g pane-border-style        bg=default
set -g pane-active-border-style fg=colour110
set -g pane-active-border-style bg=default

# splitting up panes and windows
bind | split-window   -h
bind '\' split-window   -v
bind m command-prompt -p "merge with:" "join-pane -t '%%'"
bind b break-pane     -d
bind - command-prompt -p "swap with:" "swap-window -t '%%'"

# selecting panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# resizing panes
bind C-h resize-pane -L 10
bind C-j resize-pane -D 10
bind C-k resize-pane -U 10
bind C-l resize-pane -R 10
# workaround to make ^h work under certain conditions (^h is secretly the controlcode for a backspace)
bind BSpace resize-pane -L 10

# generic hotkeys
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."