圣者
精华
|
战斗力 鹅
|
帖子
注册时间 2009-11-11
|
需求不完全一样。
我自己不是很习惯tiling wm, 只会用快捷键在需要时把窗口放到左半边/右半边屏幕,全屏之类的。
所以我喜欢用ctrl-space这个快捷键来实现这样的功能:如果terminal现在是激活状态,那么就隐藏他,否则就focus它。 这样我在任何需要terminal的时候都可以快速的呼出他,使用后直接用同样的快捷键直接把他隐藏了。
xdotool其实可以实现类似的功能:
- xdotool search --class Konsole windowactivate || konsole
复制代码
但是看起来这个只在x11可以很好的工作
社区有类似的工具,号称wayland下可以工作: https://git.sr.ht/~brocellous/wlrctl
它的首页就有类似的场景:
$ wlrctl window focus firefox || swaymsg exec firefox
... to focus firefox if it is running, otherwise start firefox.
可惜,我没法跑起来。 |
|