-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
73 lines (54 loc) · 2.12 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
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file /home/yash/.tmux.conf
# C-a C-a for the Last Active Window
bind-key C-a last-window
# Start Window Numbering at 1
set -g base-index 1
# Aggressive Resize
setw -g aggressive-resize on
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# Start a non-login shell
set -g default-command "${SHELL}"
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer"'
# Enable Xterm keys
set-option -g xterm-keys on
## set the default TERM
set -g default-terminal screen
## update the TERM variable of terminal emulator when creating a new session or attaching a existing session
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
## determine if we should enable 256-colour support
if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color'
set -g set-titles on
set -g set-titles-string "#T"
# Automatically set window title
setw -g automatic-rename
set -g history-limit 10000
set -g @batt_remain_short true
set -g status-right "Online: #{online_status} | #{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain}"
set -g status-left '#[fg=green]#H #{prefix_highlight}'
set -g status-left '#{prefix_highlight}'
# TMUX Plugin Manager
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'