-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
75 lines (56 loc) · 2.05 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
# Most of the settings are inherited from The Tao of tmux
# Prefix + ( Switch the attached client to the previous session.
# Prefix + ) Switch the attached client to the next session.
# Prefix + L Switch the attached client back to the last session.
# Prefix + s Select a new session for the attached client interactively.
# rename-session -t 1 "my session"
# Prefix + z
# Default prefix to Ctrl+a
set-option -g prefix C-a
unbind-key C-b
bind-key a send-prefix
setw -g monitor-activity on
set -g visual-activity on
# Use mouse to select panes
set-option -g mouse on
# Ease in traversing window, because default index start at 0,
# thus hard to type Prefix + 0.
set -g base-index 1
# Store more history; default 2000
set -g history-limit 30000
# vi-like pane transversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Visual cues for splits
bind \\ split-window -h
bind - split-window -v
# Ask for window name
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# Toggle pane keyboard sync
bind-key y setw synchronize-panes
# Reload config without exiting tmux
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# This frees up C+Navkey navigation
# Only one of the below setting is needed in my opinion
set-window-option -g xterm-keys on
# Set up the shell
# set -g default-shell /bin/zsh
# ================== #
# Statusbar #
# ================== #
# Default statusbar looks like this:
# [session-index] <win-index>:<process-name> "<hostname>" m:s d-M-Y
# All colors:
# black, red, green, yellow, blue, magenta, cyan, white
# See man.openbsd.org/OpenBSD-current/man1/tmux.1
# Black and white theme
set -g status-bg black
set -g status-fg white
set -g window-status-style bg=white,fg=black
set -g status-left-length 30
set -g status-left '#[fg=green](#S) '
set -g status-right-length 40
# This shows UTC + IST in statusbar
set -g status-right "#[fg=white]#I:#P #[fg=yellow]:: [%d %b |#[fg=cyan] #(TZ=UTC date -u +%%H:%%M) UTC | #(TZ=Asia/Kolkata date +%%H:%%M) IST]"