mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
translating
This commit is contained in:
parent
a2cd688cf5
commit
a551b34ced
@ -1,118 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to use Terminator on Linux to run multiple terminals in one window)
|
||||
[#]: via: (https://www.networkworld.com/article/3436784/how-to-use-terminator-on-linux-to-run-multiple-terminals-in-one-window.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
How to use Terminator on Linux to run multiple terminals in one window
|
||||
======
|
||||
Providing an option for multiple GNOME terminals within a single window frame, Terminator lets you flexibly align your workspace to suit your needs.
|
||||
Sandra Henry-Stocker
|
||||
|
||||
If you’ve ever wished that you could line up multiple terminal windows and organize them in a single window frame, we may have some good news for you. The Linux **Terminator** can do this for you. No problemo!
|
||||
|
||||
### Splitting windows
|
||||
|
||||
Terminator will initially open like a terminal window with a single window. Once you mouse click within that window, however, it will bring up an options menu that gives you the flexibility to make changes. You can choose “**split horizontally**” or “**split vertically**” to split the window you are currently position in into two smaller windows. In fact, with these menu choices, complete with tiny illustrations of the resultant split (resembling **=** and **||**), you can split windows repeatedly if you like. Of course, if you split the overall window into more than six or nine sections, you might just find that they're too small to be used effectively.
|
||||
|
||||
**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][1] ]**
|
||||
|
||||
Using ASCII art to illustrate the process of splitting windows, you might see something like this:
|
||||
|
||||
```
|
||||
+-------------------+ +-------------------+ +-------------------+
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | ==> |-------------------| ==> |-------------------|
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
+-------------------+ +-------------------+ +-------------------+
|
||||
Original terminal Split horizontally Split vertically
|
||||
```
|
||||
|
||||
Another option for splitting windows is to use control sequences like **Ctrl+Shift+e** to split a window vertically and **Ctrl+Shift+o** (“o" as in “open”) to split the screen horizontally.
|
||||
|
||||
Once Terminator has split into smaller windows for you, you can click in any window to use it and move from window to window as your work dictates.
|
||||
|
||||
### Maximizing a window
|
||||
|
||||
If you want to ignore all but one of your windows for a while and focus on just one, you can click in that window and select the "**Maximize**" option from the menu. That window will then grow to claim all of the space. Click again and select "**Restore all terminals**" to return to the multi-window display. **Ctrl+Shift+x** will toggle between the normal and maximized settings.
|
||||
|
||||
The window size indicators (e.g., 80x15) on window labels display the number of characters per line and the number of lines per window that each window provides.
|
||||
|
||||
### Closing windows
|
||||
|
||||
To close any window, bring up the Terminator menu and select **Close**. Other windows will adjust themselves to take up the space until you close the last remaining window.
|
||||
|
||||
### Saving your customized setup(s)
|
||||
|
||||
Setting up your customized terminator settings as your default once you've split your overall window into multiple segments is quite easy. Select **Preferences** from the pop-up menu and then **Layouts** from the tab along the top of the window that opens. You should then see **New Layout** listed. Just click on the **Save** option at the bottom and **Close** on the bottom right. Terminator will save your settings in **~/.config/terminator/config** and will then use this file every time you use it.
|
||||
|
||||
You can also enlarge your overall window by stretching it with your mouse. Again, if you want to retain the changes, select **Preferences** from the menu, **Layouts** and then **Save** and **Close** again.
|
||||
|
||||
### Choosing between saved configurations
|
||||
|
||||
If you like, you can set up multiple options for your Terminator window arrangements by maintaining a number of config files, renaming each afterwards (e.g., config-1, config-2) and then moving your choice into place as **~/.config/terminator/config** when you want to use that layout. Here's an example script for doing something like this script. It lets you choose between three pre-configured window arrangements:
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
PS3='Terminator options: '
|
||||
options=("Split 1" "Split 2" "Split 3" "Quit")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Split 1")
|
||||
config=config-1
|
||||
break
|
||||
;;
|
||||
"Split 2")
|
||||
config=config-2
|
||||
break
|
||||
;;
|
||||
"Split 3")
|
||||
config=config-3
|
||||
break
|
||||
;;
|
||||
*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd ~/.config/terminator
|
||||
cp config config-
|
||||
cp $config config
|
||||
cd
|
||||
terminator &
|
||||
```
|
||||
|
||||
You could give the options more meaningful names than "config-1" if that helps.
|
||||
|
||||
### Wrap-up
|
||||
|
||||
Terminator is a good choice for setting up multiple windows to work on related tasks. If you've never used it, you'll probably need to install it first with a command such as "sudo apt install terminator" or "sudo yum install -y terminator".
|
||||
|
||||
Hopefully, you will enjoy using Terminator. And, as another character of the same name might say, "I'll be back!"
|
||||
|
||||
Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3436784/how-to-use-terminator-on-linux-to-run-multiple-terminals-in-one-window.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua
|
||||
[2]: https://www.facebook.com/NetworkWorld/
|
||||
[3]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,114 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to use Terminator on Linux to run multiple terminals in one window)
|
||||
[#]: via: (https://www.networkworld.com/article/3436784/how-to-use-terminator-on-linux-to-run-multiple-terminals-in-one-window.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
如何在 Linux 上使用 Terminator 在一个窗口中运行多个终端
|
||||
======
|
||||
Terminator 为在单窗口中运行多个 GNOME 终端提供了一个选择,让你可以灵活地调整工作空间来适应你的需求。
|
||||
|
||||
如果你曾经希望可以排列多个终端并将它们组织在一个窗口中,那么我们可能会给你带来一个好消息。 Linux **Terminator** 可以为你做到这一点。没有问题!
|
||||
|
||||
### 分割窗口
|
||||
|
||||
Terminator 最初像在单独窗口中打开终端一样。但是,一旦在该窗口中单击鼠标,它将弹出一个选项,让你可以灵活地进行更改。你可以选择“**水平分割**”或“**垂直分割**”将你当前所在的窗口分为两个较小的窗口。实际上,菜单旁会有小的分割结果图示(类似于**=** and **||**),你可以根据需要重复拆分窗口。当然,你如果将整个窗口分为六个或九个以上,那么你可能会发现它们太小而无法有效使用。
|
||||
|
||||
使用 ASCII 艺术来说明分割窗口的过程,你可能会看到类似以下的样子:
|
||||
|
||||
```
|
||||
+-------------------+ +-------------------+ +-------------------+
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | ==> |-------------------| ==> |-------------------|
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
+-------------------+ +-------------------+ +-------------------+
|
||||
原始终端 水平分割 垂直分割
|
||||
```
|
||||
|
||||
另一种拆分窗口的方法是使用控制序列,例如,使用**Ctrl+Shift+e** 垂直分割窗口,使用 **Ctrl+Shift+o**(“o” 表示“打开”)水平分割窗口。
|
||||
|
||||
在 Terminator 分割完成后,你可以点击任意窗口使用,并根据工作需求在窗口间移动。
|
||||
|
||||
### 最大化窗口
|
||||
|
||||
如果你想暂时忽略除了一个窗口外的其他窗口,你可以单击该窗口,然后从菜单中选择“**最大化**”选项。接着该窗口会撑满所有空间。再次单击并选择“**还原所有终端**”返回到多窗口显示。使用 **Ctrl+Shift+x** 将在正常和最大化设置之间切换。
|
||||
|
||||
窗口标签上的窗口大小指示(例如 80x15)显示了每行的字符数以及每个窗口的行数。
|
||||
|
||||
### 关闭窗口
|
||||
|
||||
要关闭任何窗口,请打开 Terminator 菜单,然后选择**关闭**。其他窗口将自行调整占用空间,直到你关闭最后一个窗口。
|
||||
|
||||
### 保存你的自定义设置
|
||||
|
||||
将窗口分为多个部分后,将自定义的 Terminator 设置设置为默认非常容易。从弹出菜单中选择**首选项**,然后从打开的窗口顶部的选项卡中选择**布局**。接着你应该看到列出了**新布局**。只需单击底部的**保存**,然后单击右下角的**关闭**。Terminator 会将您的设置保存在 **~/.config/terminator/config** 中,然后每次使用到时都会使用该文件。
|
||||
|
||||
你也可以通过使用鼠标拉伸来扩大整个窗口。再说一次,如果要保留更改,请从菜单中选择**首选项**,**布局**,接着选择**保存**和**关闭**。
|
||||
|
||||
### 在保存的配置之间进行选择
|
||||
|
||||
如果愿意,你可以通过维护多个配置文件来设置多种 Terminator 窗口布局,重命名每个配置文件(如 config-1、config-2),接着在你想使用它时将它移动到 **~/.config/terminator/config** 中。这有一个类似执行此任务的脚本。它让你在 3 个预配置的窗口布局之间进行选择。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
PS3='Terminator options: '
|
||||
options=("Split 1" "Split 2" "Split 3" "Quit")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Split 1")
|
||||
config=config-1
|
||||
break
|
||||
;;
|
||||
"Split 2")
|
||||
config=config-2
|
||||
break
|
||||
;;
|
||||
"Split 3")
|
||||
config=config-3
|
||||
break
|
||||
;;
|
||||
*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd ~/.config/terminator
|
||||
cp config config-
|
||||
cp $config config
|
||||
cd
|
||||
terminator &
|
||||
```
|
||||
|
||||
如果有用的话,你可以给选项一个比 “config-1” 更有意义的名称。
|
||||
|
||||
### 总结
|
||||
|
||||
Terminator 是设置多窗口处理相关任务的不错选择。 如果你从未使用过它,那么可能需要先使用 “sudo apt install terminator” 或 “sudo yum install -y terminator” 之类的命令进行安装。
|
||||
|
||||
希望你喜欢使用 Terminator。还有,如另一个同名角色所说,“我会回来的!”
|
||||
|
||||
在 [Facebook][2] 和 [LinkedIn][3] 中加入 Network World 社区,评论热门主题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3436784/how-to-use-terminator-on-linux-to-run-multiple-terminals-in-one-window.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[2]: https://www.facebook.com/NetworkWorld/
|
||||
[3]: https://www.linkedin.com/company/network-world
|
Loading…
Reference in New Issue
Block a user