1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

tce add tmux

This commit is contained in:
shylinux 2018-09-20 22:49:29 +08:00
parent be209f7769
commit 9f23e5f6b4
2 changed files with 63 additions and 2 deletions

View File

@ -87,8 +87,25 @@ if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "\
set -g mouse-select-pane on; \ set -g mouse-select-pane on; \
set -g mouse-resize-pane on; \ set -g mouse-resize-pane on; \
"# }}} "# }}}
# tmux 2.x{{{ # tmux 2.x# {{{
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\ if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\
set -g mouse on; \
"
# }}}
# tmux 2.3{{{
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` = '2' -a `tmux -V |cut -d' ' -f2|cut -d'.' -f2` = '3']" "\
# bind -T copy-mode-vi y send-keys -X scroll-down; \
# bind -T copy-mode-vi e send-keys -X scroll-up; \
# bind -T copy-mode-vi d send-keys -X halfpage-down; \
# bind -T copy-mode-vi u send-keys -X halfpage-up; \
# bind -T copy-mode-vi f send-keys -X page-down; \
# bind -T copy-mode-vi b send-keys -X page-up; \
# bind -T copy-mode-vi v send-keys -X begin-selection; \
# bind -T copy-mode-vi c send-keys -X copy-selection; \
"
# }}}
# tmux 2.6{{{
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` = '2' -a `tmux -V |cut -d' ' -f2|cut -d'.' -f2` = '6' ]" "\
bind -T copy-mode-vi y send-keys -X scroll-down; \ bind -T copy-mode-vi y send-keys -X scroll-down; \
bind -T copy-mode-vi e send-keys -X scroll-up; \ bind -T copy-mode-vi e send-keys -X scroll-up; \
bind -T copy-mode-vi d send-keys -X halfpage-down; \ bind -T copy-mode-vi d send-keys -X halfpage-down; \
@ -97,6 +114,5 @@ if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\
bind -T copy-mode-vi b send-keys -X page-up; \ bind -T copy-mode-vi b send-keys -X page-up; \
bind -T copy-mode-vi v send-keys -X begin-selection; \ bind -T copy-mode-vi v send-keys -X begin-selection; \
bind -T copy-mode-vi c send-keys -X copy-selection; \ bind -T copy-mode-vi c send-keys -X copy-selection; \
set -g mouse on; \
" "
# }}} # }}}

View File

@ -150,6 +150,11 @@ Ctrl+b d
$ tmux $ tmux
``` ```
如下按下Ctrl+b然后再按问号?就可以查看所有快捷键。可以按方向键上下翻页按字母q可以退出查看。
```
Ctrl+b ?
```
#### tmux命令行体验 #### tmux命令行体验
tmux的控制方式除了方便的快捷键还有丰富的命令行。 tmux的控制方式除了方便的快捷键还有丰富的命令行。
@ -170,6 +175,23 @@ $ tmux list-sessions
$ tmux attach-session $ tmux attach-session
``` ```
除了在外部终端命令行中执行tmux命令还可以在tmux中执行命令按Ctrl+b然后按冒号就进入底行模式然后就可以输入各种命令最后按回车执行。
```
Ctrl+b : split-window <Enter>
```
显示时间,按任意键退出。
```
Ctrl+b : clock-mode <Enter>
```
显示状态条
```
Ctrl+b : set status on <Enter>
```
隐藏状态条
```
Ctrl+b : set status on <Enter>
```
#### tmux客户端与会话 #### tmux客户端与会话
tmux是以CS的服务模型实现窗口管理。 tmux是以CS的服务模型实现窗口管理。
tmux的后台服务负责管理客户端与会话的连接。可以同时管理多个会话多个客户端所以可以支持多个人同时连接服务。 tmux的后台服务负责管理客户端与会话的连接。可以同时管理多个会话多个客户端所以可以支持多个人同时连接服务。
@ -314,6 +336,29 @@ visual-silence
word-separators word-separators
#### tmux缓存管理
list-buffers
show-buffer
save-buffer
load-buffer
set-buffer
delete-buffer
choose-buffer
paste-buffer
clear-history
#### tmux状态行
display-message
confirm-before
command-prompt
#### tmux其它命令
clock-mode
server-info
lock-server
if-shell
run-shell
wait-for
#### tmux缓存管理 #### tmux缓存管理