帮助“终结者”配置,或任何可以执行相同功能的工具

发布于 11-15 09:51 字数 652 浏览 5 评论 0原文

在开发项目期间,我必须在 gnome-terminal 中打开多个选项卡,其中一些选项卡仅用作输出流,其他选项卡用作 shell 提示符。

他们是自动化这项任务的一种方法吗? 就像运行一个自动打开多个终端并在每个终端上运行某些命令的脚本一样,这些终端是垂直或水平显示的,而不是像网格显示或其他东西一样显示在选项卡(或不同的窗口)中。

“终结者”正是我想要的,但我只是无法将其配置为像我想要的那样工作。 我不明白“布局”的事情

这是我的“配置”文件的一部分:

[layouts]
  [[default]]
    [[[child1]]]
      type = Terminal
      parent = window0
      position = left
   [[[child2]]]
      type = Terminal
      parent = window0
      position = left
   [[[window0]]]
      type = Window
      parent = ""

当我运行终结者时,会打印出一条错误,说我的子项数量不正确,然后“终结者”正常显示在一个终端上。

我不知道我在这里做错了什么,我将不胜感激任何有关“终结者”或具有相同功能的工具的帮助。

谢谢。

During developing a project I had to open multiple tabs in gnome-terminal, some of them as just output streams, others for the shell prompt.

Is their a way to automate this task.
Like running a script that automatically opens multiple terminals and run certain commands on each of them, and these terminals are displayed vertically or horizontally rather than in tabs ( or different windows ) like grid-display or something.

'Terminator' does exactly what I want, but I just can't configure it to work like what I want.
I don't get the 'Layout' thing

Here's part of my 'config' file:

[layouts]
  [[default]]
    [[[child1]]]
      type = Terminal
      parent = window0
      position = left
   [[[child2]]]
      type = Terminal
      parent = window0
      position = left
   [[[window0]]]
      type = Window
      parent = ""

When I run terminator, an error is printed out saying that I there's an incorrect number of children, and then 'terminator' appears normally with a single terminal.

I don't know what I'm doing wrong here, I would appreciate any help with 'Terminator' or with any tool that has the same functionality.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦巷2024-11-22 09:51:09

我认为你必须尝试 terminator 一个 ruby​​ gem,它将帮助你管理自动化配置文件。

Termitor 可以自动设置您的开发工作流程。更少的设置时间,更多的时间完成工作。

另外,另一种选择是 teamocil

Teamocil 是一个用于使用 Ruby 和 YAML 在 tmux 中自动创建窗口和分割的工具。与 tmuxinator 类似,但具有拆分功能,而不仅仅是 Windows。

I think you have to try terminator a ruby gem that will help you to mange automation config files.

Terminitor automates your development workflow setup. Less time setting up, more time getting things done.

Also, an alternative is teamocil

Teamocil is a tool used to automatically create windows and splits in tmux with Ruby and YAML. Like tmuxinator, but with splits, not just windows.

你丑哭了我2024-11-22 09:51:09

您考虑过使用“屏幕”吗?有一个“分割”命令。

  • “CTRL+a, S”(大写 S)创建新选项卡
  • “CTRL+a, Tab”切换到此选项卡
  • “CTRL+a, c”在此选项卡中创建新屏幕

Did you consider using 'screen' ? there is a 'split' command.

  • "CTRL+a, S" (Capital S) to create a new tab
  • "CTRL+a, Tab" to Switch to this tab
  • "CTRL+a, c" to create a new screen in this tab
写下不归期2024-11-22 09:51:09

好吧,我建议你忘记终结者(来自一个漫长的时间终结者用户)并学习使用像 tmux 这样的终端多路复用器。有一个名为 tmuxinator 的 gem,它可以让您使用 YAML 配置会话,所以它非常非常简单。

对于 tmux,我建议您从 Brian 的书《tmux:高效无鼠标开发》开始霍根。

Well, I suggest you to forget terminator (coming from a looong time terminator user) and learn to use a terminal multiplexer like tmux. There's a gem called tmuxinator that lets you configure sessions with YAML, so it's really, really easy.

For tmux I suggest you to start with the book «tmux: Productive Mouse-Free Development» from Brian Hoogan.

孤檠2024-11-22 09:51:09

我一直在开发一个 shell 脚本来完全满足您的需求

https://github.com/vahidhedayati /terminator-win-splitter

chmod to 755

./termcon.sh -h

./termcon.sh -c {连接到现有布局 - 按 Enter 键,它将列出您现有的布局 }

./termcon.sh -f filename.txt {连接到 filename.txt 中列出的服务器并存储布局}

./termcon.sh -l prod ta ce cex {列出生产环境中具有 tomcat 或 apache 的 ce cex 自动发现的节点命名 } }

./termcon.sh -a prod ta ce cex {连接到生产环境中自动发现的 ce cex 节点,这些节点在命名中具有 tomcat 或 apache商店布局}

我仍在研究窗口分割,它非常复杂,但现在它可以毫无问题地进行 4 个窗口分割,当它工作时,我再次通过电子邮件发送它只是

./termcon.sh -w 的情况8 -a prod ta ce cex

./termcon.sh -w 8 -f file.txt

如果通过文件调用,我还建议根据服务器命名约定命名文件,因为一旦存储布局,它就不会覆盖它

I have been working on a shell script to do exactly what you need

https://github.com/vahidhedayati/terminator-win-splitter

chmod to 755

./termcon.sh -h

./termcon.sh -c {connects to existing layouts - press enter and it will list your existing layouts }

./termcon.sh -f filename.txt {connects to servers listing within filename.txt and stores layout }

./termcon.sh -l prod ta ce cex {LISTS auto discovered nodes for ce cex in production env which have tomcat or apache in naming } }

./termcon.sh -a prod ta ce cex {Connects to auto discovered nodes for ce cex in production env which have tomcat or apache in naming and stores layout}

I am still working on windows split, it is quite complex but for now it does a 4 window split with no issues, when it is working and i emailed again it will just be a case of

./termcon.sh -w 8 -a prod ta ce cex

./termcon.sh -w 8 -f file.txt

I would also recommend if calling via a file then to name files according to server naming convention since once a layout is stored it won't overwrite it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文