-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
83 lines (67 loc) · 2.64 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
# Set the prefix to ^T.
unbind C-b
set -g prefix C-t
bind C-t send-prefix
# bind a reload key
bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."
# Improve colors
set -g default-terminal "screen-256color"
# pass "Ptmux;" escape sequences through to the terminal
set-window-option -g allow-passthrough on
# key ---
# Vim-like keybinding
## For 1.9 - Make new windows start in the
# same directory as the current window
bind c new-window -c '#{pane_current_path}'
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
bind C-p previous-window
bind C-n next-window
bind -r < resize-pane -L 1
bind -r > resize-pane -R 1
bind -r - resize-pane -D 1
bind -r + resize-pane -U 1
bind : command-prompt
# Open sub information window below.
bind i split-window -v -p 25 -c '#{pane_current_path}'
# Toggle maximizing the window. Show *o*nly the current window.
bind o resize-pane -Z
set-window-option -g mode-keys vi
bind-key Escape copy-mode
# emacs key bindings in tmux command prompt (prefix + :)
set-option -g status-keys emacs
# kill Q q
unbind Q
bind Q confirm-before "kill-window"
unbind q
bind q confirm-before "kill-window"
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
set -g detach-on-destroy off # don't exit from tmux when closing a session
# tmux new-session -t {number/name}
setw -g aggressive-resize on
# Quick session switcher: Bind a key to prompt a session list for quick switching.
# This allows you to press your prefix key followed by s to select and switch between sessions easily.
bind-key S choose-tree -Zs
bind-key Space run-shell "tmux switch -t `tmux list-sessions \
| cut -d : -f 1 \
| fzf-tmux -p 65%,70% --preview 'tmux capture-pane -e -pt {}'`"
### Tmux Plugings ###
# prefix + I to install plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Colorscheme
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, kubernetes-context, synchronize-panes
set -g @dracula-plugins "git time cpu-usage ram-usage"
# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, `window`, or any character.
set -g @dracula-show-left-icon session
set -g @dracula-military-time true
set -g @dracula-time-format "%F %R"
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'