首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为热键序列创建热键

为热键序列创建热键
EN

Unix & Linux用户
提问于 2021-04-27 17:19:19
回答 2查看 315关注 0票数 1

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

我使用终结者终端来达到这个效果。

现在,需要大量的热键才能到达那个设置。我将终止符设置为Super-T;然后需要垂直拆分(Ctrl-Shift-O),然后水平拆分(Ctrl-Shift-O)。然后我用Ctrl-DownCtrl-Right移动终端。我想要创建一个单一的热键,可以排序所有这些组合在一个单一的媒体。我试图使用xdotool编写一个脚本:

代码语言:javascript
复制
#!/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)。其他按键不注册在结束符窗口,以实现必要的窗口自定义。

有没有人对如何做到这一点有更好的建议?

EN

回答 2

Unix & Linux用户

发布于 2021-10-22 18:53:00

您可以从shell脚本上的热键中编写所有命令,并重新定义新的热键以执行该脚本。在/bin/ (具有执行权限)或将脚本的路径添加到环境变量路径中找到脚本,以便热键可以将其检测为命令。

票数 0
EN

Unix & Linux用户

发布于 2021-10-25 21:56:21

它实际上并不会创建热键序列,但可能会得到所需的结果(?)

按您喜欢的方式设置,然后右键单击其中一个终端-> preferences ->布局选项卡

单击“默认”,然后保存。

所以现在你只需要再次打开终结者,你就会有你的布局立即。

但我不明白“移动终端机”部分.

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/647029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档