serverapps:tmux:plugin
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| serverapps:tmux:plugin [2022/12/03 08:54] – hayashi | serverapps:tmux:plugin [2023/10/09 13:30] (現在) – [tcsh@FreeBSD] hayashi | ||
|---|---|---|---|
| 行 9: | 行 9: | ||
| === Configure === | === Configure === | ||
| - | ~/ | + | ~/ |
| <file conf ~/ | <file conf ~/ | ||
| # List of plugins | # List of plugins | ||
| 行 41: | 行 41: | ||
| tmux-plugins/ | tmux-plugins/ | ||
| Tmux Resurrectプラグインを使用するとtmux環境を保存できるので、PCを再起動しても環境を簡単に復元できるようになる。\\ | Tmux Resurrectプラグインを使用するとtmux環境を保存できるので、PCを再起動しても環境を簡単に復元できるようになる。\\ | ||
| + | |||
| + | set -g @plugin ' | ||
| + | |||
| + | ===== plugin 読み込み ===== | ||
| + | |||
| + | **prefix + I((大文字I(アイ) ))** で plugin 読み込みます | ||
| + | ===== 起動 ===== | ||
| + | |||
| + | |||
| + | |||
| + | なお、**bash**に依存していますので、それ以外のshellを使用している場合には以下のような感じで起動 | ||
| + | |||
| + | bash -c "tmux new -s Work" | ||
| + | |||
| + | ===== Key bindings ===== | ||
| + | |||
| + | prefix + Ctrl-s - save | ||
| + | prefix + Ctrl-r - restore | ||
| + | |||
| + | 以下を設定すると | ||
| + | set -g @resurrect-save ' | ||
| + | set -g @resurrect-restore ' | ||
| + | Key bindingは | ||
| + | prefix + Shift-s - save | ||
| + | prefix + Shift-r - restore | ||
| ===== tmux-continuum ===== | ===== tmux-continuum ===== | ||
| tmux-continuumはTmux Resurrectをサポートするプラグインで自動で保存/復元を可能にする。よってこれらはセットで使うのがよさそう。 | tmux-continuumはTmux Resurrectをサポートするプラグインで自動で保存/復元を可能にする。よってこれらはセットで使うのがよさそう。 | ||
| + | |||
| + | tmux-resurrect が必要です | ||
| + | |||
| + | |||
| + | set -g @plugin ' | ||
| + | set -g @plugin ' | ||
| + | |||
| + | ==== tcsh@FreeBSD ==== | ||
| + | tmux-continuumもbashやmacosに依存しているため、ほかの環境だと動作が怪しい | ||
| + | で、取り急ぎだがLogin時に自動でtmuxの起動とrestoreを行うように設定してみた | ||
| + | |||
| + | <file config ~/ | ||
| + | ps -ax | grep tmux | grep -v grep | wc -l > /dev/null || bash -c "tmux new -d ~/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| ===== 参考 ===== | ===== 参考 ===== | ||
serverapps/tmux/plugin.1670057685.txt.gz · 最終更新: by hayashi
