gpt4 book ai didi

tmux - 如何同时启动两个或多个 tmux(或 tmuxinator) session ?

转载 作者:行者123 更新时间:2023-12-01 18:14:58 26 4
gpt4 key购买 nike

我是 tmux + tmuxinator 的 super 粉丝。最近购买时,我发现自己正在使用不同的 session ,尽管我使用 tmuxinator 配置了它们,但我仍然需要每天一次打开一个 session 。

有没有办法同时打开两个或多个 session ,以便我一启动 tmux 或 tmuxinator 就可以在它们之间导航?

最佳答案

看看我写的这个小 mac os 脚本:

#!/bin/bash
sessions=( session1 session2 )
for i in "${sessions[@]}"
do
osascript <<EOF
tell application "iTerm" to activate
tell application "System Events" to tell process "iTerm" to keystroke "t" using command down
tell application "System Events" to tell process "iTerm" to keystroke "tmuxinator start ${i}"
tell application "System Events" to tell process "iTerm" to key code 52
EOF
done

关于tmux - 如何同时启动两个或多个 tmux(或 tmuxinator) session ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37795912/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com