我正在使用Ubuntu20.04,我是喜欢Gnome的人之一。即使如此,有时我还是喜欢把我的终端机贴上来上班。通常我会把它们设成这样:

我使用终结者终端来达到这个效果。
现在,需要大量的热键才能到达那个设置。我将终止符设置为Super-T;然后需要垂直拆分(Ctrl-Shift-O),然后水平拆分(Ctrl-Shift-O)。然后我用Ctrl-Down和Ctrl-Right移动终端。我想要创建一个单一的热键,可以排序所有这些组合在一个单一的媒体。我试图使用xdotool编写一个脚本:
#!/bin/bash
xdotool key super+j
xdotool key shift+F1
xdotool key super+Up
xdotool key ctrl+shift+o
xdotool key ctrl+shift+e
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key ctrl+shift+Down
xdotool key alt+Down
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key ctrl+shift+Left
xdotool key alt+Right
xdotool ipython为了完成我需要完成的任务,这将是一个快速而肮脏的开始,但它所做的只是打开一个新的工作区(Super-J)和一个终止器实例(Shift-F1)。其他按键不注册在结束符窗口,以实现必要的窗口自定义。
有没有人对如何做到这一点有更好的建议?
发布于 2021-10-22 18:53:00
您可以从shell脚本上的热键中编写所有命令,并重新定义新的热键以执行该脚本。在/bin/ (具有执行权限)或将脚本的路径添加到环境变量路径中找到脚本,以便热键可以将其检测为命令。
发布于 2021-10-25 21:56:21
它实际上并不会创建热键序列,但可能会得到所需的结果(?)
按您喜欢的方式设置,然后右键单击其中一个终端-> preferences ->布局选项卡
单击“默认”,然后保存。
所以现在你只需要再次打开终结者,你就会有你的布局立即。
但我不明白“移动终端机”部分.
https://unix.stackexchange.com/questions/647029
复制相似问题