tmux
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tmux [2017/01/31 16:22] – created ssm2017 | tmux [2022/02/07 13:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== tmux ====== | ||
| ===== links ===== | ===== links ===== | ||
| * [[http:// | * [[http:// | ||
| Line 54: | Line 55: | ||
| tmux -S / | tmux -S / | ||
| + | ==== Admin config ==== | ||
| + | in ~/ | ||
| + | <sxh bash> | ||
| + | # C-b is not acceptable -- Vim uses it | ||
| + | set-option -g prefix C-a | ||
| + | bind-key C-a last-window | ||
| + | # Start numbering at 1 | ||
| + | set -g base-index 1 | ||
| + | |||
| + | # Allows for faster key repetition | ||
| + | set -s escape-time 0 | ||
| + | |||
| + | # Set status bar | ||
| + | set -g status-bg black | ||
| + | set -g status-fg white | ||
| + | set -g status-left "" | ||
| + | set -g status-right "# | ||
| + | |||
| + | # Rather than constraining window size to the maximum size of any client | ||
| + | # connected to the *session*, constrain window size to the maximum size of any | ||
| + | # client connected to *that window*. Much more reasonable. | ||
| + | setw -g aggressive-resize on | ||
| + | |||
| + | # Allows us to use C-a a to send commands to a TMUX session inside | ||
| + | # another TMUX session | ||
| + | bind-key a send-prefix | ||
| + | |||
| + | # Activity monitoring | ||
| + | #setw -g monitor-activity on | ||
| + | #set -g visual-activity on | ||
| + | |||
| + | # Example of using a shell command in the status line | ||
| + | #set -g status-right "# | ||
| + | |||
| + | # Highlight active window | ||
| + | set-window-option -g window-status-current-bg red | ||
| + | </ | ||
| + | |||
| + | ===== tmux php ===== | ||
| + | <sxh php> | ||
| + | exec(' | ||
| + | print_r($output); | ||
| + | print_r($code); | ||
| + | </ | ||
| + | |||
| + | / | ||
| + | <sxh> | ||
| + | www-data ALL=(ALL) NOPASSWD: | ||
| + | # be carefull, it is better to filter the commands sending the script to a bash script | ||
| + | www-data ALL=(ALL) NOPASSWD: / | ||
| + | </ | ||
| + | |||
| + | / | ||
| + | <sxh> | ||
| + | set -g default-shell '/ | ||
| + | </ | ||
| {{tag> | {{tag> | ||
tmux.1485876134.txt.gz · Last modified: (external edit)
