注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| use std::sync::{Arc, Mutex, Condvar}; | |
| use std::thread; | |
| struct Producer { | |
| cvar: Arc<(Mutex<bool>, Condvar)> | |
| } | |
| impl Producer { | |
| pub fn new(cvar: Arc<(Mutex<bool>, Condvar)>) -> Producer { | |
| Producer { |
| #!/bin/bash | |
| # Baidu Yun Command Line Interface | |
| # Depends: bash, curl, grep, awk, sed, od | |
| # (They are basicly builtin tools of any *nix system.) | |
| # Additionally, fastupload depends: head, wc, md5sum or md5, cksum | |
| # (Which are also builtin tools) | |
| #### Variables #### |
| on idle | |
| tell application "System Events" | |
| tell current location of network preferences | |
| set myConnection to the service "VPN" #rename as your VPN connection called | |
| if myConnection is not null then | |
| if current configuration of myConnection is not connected then | |
| connect myConnection | |
| end if | |
| end if | |
| end tell |