-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
85 lines (67 loc) · 2.91 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
####################################
# Tmux Configuration Settings
# Written by : Tedi Heriyanto
# Version : 0.1 (May 20, 2018)
# : 0.2 (Nov 02, 2018)
####################################
# Key binding
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#open window with currrent path
bind c new-window -c '#{pane_current_path}'
# split panes using | and - with current path
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
#unbind '"'
#unbind %
# 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 control (clickable windows, panes, resizable panes)
set -g mouse on
# toggle mouse on/off
bind m set -g mouse
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# History Logging
set -g history-limit 50000
# window number,program name, active(or not)
set-option -g set-titles on
set-window-option -g automatic-rename on
# Highlight active window
setw -g window-status-current-fg red
# enable 256 colors mode - important if you want the solarized theme look
# semi-decent in vim
set -g default-terminal "screen-256color"
# highlight the current window in the status bar (blue background)
# #I - window index
# #W - window title
# #F - window flag
#set -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#(pwd="#{pane_current_path}"; echo ${pwd####*/})#[fg=dim]#F'
# Right side of status bar
# $(echo $USER) - shows the current username
# #H - shows the hostname of your computer
# %h %d %Y - date in the [Mon DD YYYY] format
# %l:%M %p - time in the [HH:MM AM/PM] format
set -g status-right '#[fg=green][#[fg=black]#(echo $USER)@#H#[fg=green]][#[fg=black]%h %d %Y #[bg=green,fg=black]%H:%M:%S #[default]#[fg=green]]'
# Search mode vi
set-window-option -g mode-keys vi
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
# Reduce the command delay time to something a bit shorter
set -sg escape-time 1
# Plugins
set-environment -g TMUX_PLUGIN_MANAGER_PATH '/home/tedi/tmux-plugins'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
run '/home/tedi/tmux-plugins/tpm/tpm'