-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.basic.conf
57 lines (42 loc) · 1.26 KB
/
tmux.basic.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
# cat <<__DATA__ >/dev/null
# Embed shell scripts
# prefix
set -g prefix C-t
unbind C-b
# mouse
set-option -g mouse on
# status bar updates every 15s by default**, change to 1s here
set -g status-interval 1
# set pane name as current dir
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# run embedded shell script
run "cut -c3- ~/.tmux.conf | bash -s apply_configuration"
# color
set -g default-terminal "screen-256color"
# new pane in same directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# extend the display time
set -g display-panes-time 2000
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'sainnhe/tmux-fzf'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# __DATA__
#
# apply_configuration() {
# tmux set -g status-bg colour$(hash_string256 $(hostname))
# tmux set -g status-fg colour$(hash_string256 $(hostname) 127)
# }
# hash_string256() {
# hash_value=$(printf "%s" "$1" | md5sum | sed -e 's/[^[:alnum:]]\+//g' | tr "a-f" "A-F")
# if [ "x" != "x$2" ]
# then
# v2="+ $2"
# fi
# echo "$(((0x$hash_value $v2) % 255))" | tr -d "-"
# }
#
# $1