(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| setup_ssh_key () | |
| { | |
| ## Function used to call ssh-copy-id script to copy my primary ssh-pub-key over | |
| ## to any new system being setup | |
| ## If length of arguments is less than 2 | |
| if [ ${#@} -lt 2 ]; then | |
| printf "%s\n" "Not enough arguments, please supply username and hostname." \ | |
| "Expected: $0 <username> <hostname>" | |
| return 1 |
| # max=875 min=236; while :; do dd if=/source/data/file-big.out of=/dest/data/file2.out bs=64k skip=$(echo $(( RANDOM % (max - min) + $(echo $RANDOM|cut -b1,2) ** 2 ))) 2>&1|tee -a /tmp/some-logfile.log; sleep 1; done |
| This file contains any messages produced by compilers while | |
| running configure, to aid debugging if configure makes a mistake. | |
| It was created by GNU tar configure 1.26, which was | |
| generated by GNU Autoconf 2.63. Invocation command line was | |
| $ ./configure --prefix=/usr/local/Cellar/gnu-tar/1.26 --mandir=/usr/local/Cellar/gnu-tar/1.26/share/man --program-prefix=g | |
| ## --------- ## | |
| ## Platform. ## |
| import time | |
| import socket | |
| def collect_metric(name, value, timestamp): | |
| sock = socket.socket() | |
| sock.connect( ("localhost", 2003) ) | |
| sock.send("%s %d %d\n" % (name, value, timestamp)) | |
| sock.close() | |
| def now(): | |
| int(time.time()) |
| input { | |
| exec { | |
| type => "dstat" | |
| command => "dstat -cdngypms --nocolor 1 0" | |
| interval => 13 | |
| } | |
| exec { | |
| type => "apache-benchmark" |
| set -U fish_color_user magenta | |
| set -U fish_color_host yellow | |
| function fish_prompt --description 'Write out the prompt' | |
| set -l last_status $status | |
| # User | |
| set_color $fish_color_user | |
| printf (whoami) | |
| set_color normal |
| Using pyCLI to create some commands and subcommands. |
As configured in my dotfiles.
start new:
tmux
start new with session name: