如何设置 tmux 以便它在打开指定窗口的情况下启动? [英] How to set up tmux so that it starts up with specified windows opened?

查看:43
本文介绍了如何设置 tmux 以便它在打开指定窗口的情况下启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置 tmux 使其启动时打开指定的窗口?

How to set up tmux so that it starts up with specified windows opened?

推荐答案

您可以编写一个小的 shell 脚本,用所需的程序启动 tmux.我在一个名为 dev-tmux 的 shell 脚本中有以下内容.开发环境:

You can write a small shell script that launches tmux with the required programs. I have the following in a shell script that I call dev-tmux. A dev environment:

#!/bin/sh
tmux new-session -d 'vim'
tmux split-window -v 'ipython'
tmux split-window -h
tmux new-window 'mutt'
tmux -2 attach-session -d

所以每次我想启动我最喜欢的开发环境时,我都可以做到

So everytime I want to launch my favorite dev environment I can just do

$ dev-tmux

这篇关于如何设置 tmux 以便它在打开指定窗口的情况下启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆