-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
142 lines (113 loc) · 4.71 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# set prefix key to ctrl+a until I have time to adapt
unbind C-b
set -g prefix C-a
# send the prefix to client inside window (ala nested sessions)
bind-key a send-prefix
# toggle last window like screen
bind-key C-a last-window
## navigate through windows like screen
## bind-key C-a-n next
bind-key n next
bind-key p prev
# $Id: t-williams.conf,v 1.1 2009/11/02 18:59:28 nicm Exp $
# #
# # ~/.tmux.conf - tmux terminal multiplexer config
# # Thayer Williams (http://cinderwick.ca)
# # "Feel free to do whatever you like with it."
#
# # set prefix key to ctrl+a
# unbind C-b
# set -g prefix C-a
#
# # send the prefix to client inside window (ala nested sessions)
# bind-key a send-prefix
#
# # toggle last window like screen
# bind-key C-a last-window
#
# # confirm before killing a window or the server
bind-key k confirm kill-window
bind-key K confirm kill-server
# toggle statusbar
bind-key b set-option status
## # ctrl+left/right cycles thru windows
## bind-key -n C-right next
## bind-key -n C-left prev
##
# open a man page in new window
bind / command-prompt "split-window 'exec man %%'"
# switch split window keys
unbind %
bind | split-window -h
bind s split-window -v
# quick view of processes
bind '`' split-window "exec htop"
# scrollback buffer n lines
set -g history-limit 100000
# listen for activity on all windows
#set -g bell-action any
setw -g monitor-activity off
set -g visual-activity off
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window indexing at three instead of zero
set -g base-index 2
# start pane indexing at three instead of zero
set-window-option -g pane-base-index 3
# enable wm window titles
set -g set-titles on
# Automatically set window title
setw -g automatic-rename off
setw -g allow-rename off
# statusbar --------------------------------------------------------------
set -g display-time 2000
# set status-interval 3
# default statusbar colors
set -g status-fg white
set -g status-bg cyan
set -g status-attr default
# default window title colors
set-window-option -g window-status-fg black
set-window-option -g window-status-bg cyan
set-window-option -g window-status-attr default
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-attr bright
# command/message line colors
set -g message-fg blue
set -g message-bg white
set -g message-attr dim
# center align the window list
set -g status-justify centre
# show some useful
## set -g status-left "[#[fg=black]#H#(uptime | cut -d ',' -f 3- | sed -e 's/ load average: //' | sed -e 's/ / /g')#[default]]"
set -g status-left "[#[fg=black]#H #(cut -d ' ' -f1,2,3 < /proc/loadavg)#[default]]"
## set -g status-left "[#[fg=black]#H#(grep --perl -o '(\d+\.\d+)' < /proc/loadavg | tr '\n' ' ')#[default]]"
set -g status-left-length 50
set -g status-right-length 75
## set -g status-right "[#[fg=black]#(uptime -p)%a %Y-%m-%d %H:%M#[default]]"
## set -g status-right "[#[fg=black]#(uptime -p | grep -o '\([0-9]\)\+\ \([a-z]\)' | tr '\n' ' :')%a %Y-%m-%d %H:%M#[default]]"
#
## not work on centos 6.9
# set -g status-right "[#[fg=black]#(uptime -p) :: %a %Y-%m-%d %H:%M#[default]]"
# set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d %H:%M:%S#[default]]"
## set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d#[default]]"
set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d :: #(upower -d | awk '/percentage/ {x=$2} END {print x}') #[default]]"
# set -g status-right '[#[fg=black]#(uptime | awk -F, "{print $1}") :: %a %Y-%m-%d :: #(upower -d | awk "/percentage/ {x=$2} END {print x}") #[default]]'
# set -g status-right '[#(uptime | awk -F, '\''{print $1}'\'') :: %a %Y-%m-%d :: #(upower -d | awk '\''/percentage/ {x=$2} END {print x}'\'') :: #(hostname) #[default]]'
# set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: #(hostname -f) :: #(upower -d | awk '$1 == "percentage:" {print $2;exit}') :: #(hostname -f) #[default]]"
# set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') #(hostname -f) :: %a %Y-%m-%d :: #(upower -d | sed -n -e '/\/DisplayDevice/,$p' | grep -Eo '([0-9]+)%') #[default]]"
set -g default-terminal "screen"
## vi style key bindings
set-window-option -g mode-keys vi
## lock
## set-option -g lock-command vlock
## set-option -g lock-after-time 1212
## bind-key Q lock-server
## rename-window -t${TMUX_PANE} "ash"
## https://github.com/tmux-plugins/tmux-resurrect
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# run-shell /home/chika.tambun/github.com/tmux-resurrect/resurrect.tmux
## https://github.com/tmux-plugins/tmux-battery
# run-shell /home/chika.tambun/github.com/tmux-battery/battery.tmux