-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
91 lines (76 loc) · 4.29 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
###############################################################################
# Information
###############################################################################
# Maintained by Concurrent Studio, 🄯 2020 (null@concurrent.studio)
# Included in Zumthor (https://github.com/concurrent-studio/zumthor)
###############################################################################
# Config
###############################################################################
# --------------------------------- General ----------------------------------
bind r source-file ~/.tmux.conf # Reload conf
# -------------------------------- Aesthetics --------------------------------
set -g default-terminal "screen-256color" # Set xterm-256color
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 1 # redraw status line every 10 seconds
set -g window-style 'fg=colour247,bg=colour232' # Inactive window colors
set -g window-active-style 'fg=white,bg=black' # Active window colors
set -g pane-border-style "fg=colour236,bg=colour232" # Inactive pane border colors
set -g pane-active-border-style "fg=colour236,bg=colour232" # Active pane border colors
# --------------------------------- Session ----------------------------------
bind x list-sessions # List tmux sessions
# ---------------------------------- Panes -----------------------------------
# Panes open with current path
bind s split-window -v -c "#{pane_current_path}" # Split window horizontally
bind v split-window -h -c "#{pane_current_path}" # Split window vertically
# Pane navigation (Vi and alt arrow key mapping)
bind -r h select-pane -L # Ctrl-b + h -> Left
bind -r j select-pane -D # Ctrl-b + j -> Down
bind -r k select-pane -U # Ctrl-b + k -> Up
bind -r l select-pane -R # Ctrl-b + l -> Right
# Pane resizing (Vi mapping)
bind < resize-pane -L 10 # Decrease horizontally split pane size
bind > resize-pane -R 10 # Increase horizontally split pane size
bind - resize-pane -D 10 # Decrease vertically split pane size
bind + resize-pane -U 10 # Increase vertically split pane size
# -------------------------------- Navigation --------------------------------
setw -g mode-keys vi # Vi-style mode keys
set -g status-keys vi # Vi-style status keys
set -g mouse on # Allow mouse to resize, scroll, etc.
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection # Vi-style visual
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection # Vi-style yank
bind P paste-buffer # Ctrl-b + P -> Paste from buffer
###############################################################################
# Status Line
###############################################################################
# ---------------------------------- Colors ----------------------------------
grey93="colour255"
grey82="colour252"
grey62="colour247"
grey27="colour238"
grey19="colour236"
grey11="colour234"
grey8="colour233"
# ------------------------------- Color Blocks -------------------------------
cb_main="#[fg=$grey93]#[bg=$grey19]"
cb_dark="#[fg=$grey62]#[bg=$grey11]"
cb_light="#[fg=$grey82]#[bg=$grey27]"
# -------------------------------- Bar General -------------------------------
set -g status-bg "$grey8" # General bar color
# -------------------------------- Window Tabs -------------------------------
set -g window-status-separator "" # Get rid of space between tabs
set -g window-status-current-format "$cb_main #I[#P]:#W " # num, pane, name
set -g window-status-format "$cb_dark #I:#W " # num, name
# ---------------------------------- Left ------------------------------------
set -g status-left-length 50 # Allow 50 characters
set -g status-left "$cb_light #S " # Session name
# ---------------------------------- Right -----------------------------------
set -g status-right-length 75 # Allow 75 characters
_user=" #(whoami)@#h " # user@hostname
_datetime=" %a %D %T " # Weekday, MM/DD/YY, HH:MM:SS
set -g status-right "$cb_dark$_user$cb_main$cb_light$_datetime"