安装oh my tmux
官方github地址: .tmux
安装教程已上传到gitee:安装.tmux
预准备
安装终端复用器tmux
-
二进制包安装
-
源码编译安装
注:源码安装过程如果如果缺少相应的依赖包,可先安装依赖软件,再编译安装
tmux
git clone https://github.com/tmux/tmux.git cd tmux bash autogen.sh ./configure && make sudo make install
安装oh my zsh
- 可参考本人另一篇博文:安装ohmyzsh
安装.tmux
- 下载源码
# git下载github方法,速度较慢,也可以拷贝到gitee再clone
git clone https://github.com/gpakosz/.tmux.git /home/king/software-pkg/zq_ohmyzsh/oh-my-tmux
# 去github仓库下载源码压缩包
❯ pwd
/home/king/software-pkg/zq_ohmyzsh/oh-my-tmux
❯ ls
tmux-master.zip
# 解压
❯ unzip tmux-master.zip -d ./
❯ ls -a
. .. .tmux-master tmux-master.zip
# 创建软链接
❯ ln -s -f ~/software-pkg/zq_ohmyzsh/oh-my-tmux/.tmux-master/.tmux.conf ~/.tmux.conf
# 用户可以通过修改配置文件~/.tmux.conf.local来个性化设置tmux
❯ cp ~/software-pkg/zq_ohmyzsh/oh-my-tmux/.tmux-master/.tmux.conf.local ~/.tmux.conf.local
配置
- 通过修改
~/.tmux.conf.local
文件,在文件尾部追加如下内容
vim ~/.tmux.conf.local
以上为本人目前的配置,欢迎补充,大佬们分享更多功能。
- 修改完之后执行
tmux source-file
让配置文件立即生效
tmux source-file ~/.tmux.conf.local
本人的配置文件已经上传到.tmux.conf.local
插件
各种插件的github地址:tmux插件
安装tmux插件管理工具tpm,本人于2021-12-26安装oh my tmux,官网已经提供了tpm的内键支持,所以不需要再额外安装了。
This configuration now comes with built-in TPM support。
- 本人目前的插件
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '30'