-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
94 lines (70 loc) · 2.53 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
92
93
94
### Bindings
# set M-a as the default prefix key combination
unbind C-b
set -g prefix M-a
bind M-a send-prefix
bind r source-file ~/.tmux.conf \; display "Configuration reloaded!"
bind x kill-pane
bind X kill-window
bind Q kill-session
bind -n M-n new-window -c "#{pane_current_path}"
bind -n M-z split-window -h -c "#{pane_current_path}"
bind -n M-x split-window -v -c "#{pane_current_path}"
# Mirror panes
bind -n M-g set-option synchronize-panes \; display "Sync pane toggled!"
bind E command-prompt -p "Command:" \
"run \"tmux list-windows | cut -d: -f1 | sort -n -r | xargs -I WINDOW tmux send-keys -t :WINDOW '%1' Enter\""
# window switching with page up/down
bind -n M-PPage previous-window
bind -n M-NPage next-window
bind -n M-S-PPage swap-window -t -1\; select-window -t -1
bind -n M-S-NPage swap-window -t +1\; select-window -t +1
# Use Ctrl-arrow keys without prefix key to switch panes
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
bind -r h resize-pane -L 4
bind -r j resize-pane -D 2
bind -r k resize-pane -U 2
bind -r l resize-pane -R 4
# window and pane indexing starts at 1
set-option -g base-index 1
set-option -g pane-base-index 1
# history size
set-option -g history-limit 50000
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
# decrease time for displaying messages
set-option -g display-time 400
# better resizing
setw -g aggressive-resize on
# vim shortcuts in scroll mode
set-window-option -g mode-keys vi
### Look
## Pane colors
#set -g pane-border-fg green
#set -g pane-border-bg black
#set -g pane-active-border-fg white
## Message colors
#set -g message-fg white
#set -g message-bg red
#set -g message-attr bright
# Status bar
set -g status-interval 7
set -g status-justify left
set -g status-fg white
set -g status-bg black
set -g status-left-length 100
set -g status-right-length 450
set -g status-left ' '
set -g status-right '#[bold]#[white]#S #I:#P#[default] | #[bold]v#(uname -r | cut -d- -f1) | #(whoami) (#(who | grep -v tty | cut -d" " -f1 | sort | uniq | wc -l) users) | #(/bin/bash ~/.dotfiles/scripts/getuptime.sh) | #(hostname) |#[default]#[fg=black,bg=magenta] %F %H:%M %a '
# Window status
setw -g window-status-format "#[bg=yellow]#[fg=black] #I :: #W "
setw -g window-status-current-format "#[bg=yellow,bold]#[fg=white] #I #[bg=blue]#[fg=white] #W "
# window renumbering and renaming
setw -g automatic-rename on
# Set window notifications
setw -g monitor-activity off
# Mouse activity
setw -g mouse off