0

I'm experimenting with using the i3 window manager (in a VM). One issue I have with it is it does not save window positions after logout. So, I'm looking for a means to save and execute the key combinations to get the specific windows where I'd like them.

Does anyone know how I might go about doing this? The manipulation would require things like alt+d and alt+enter, but also strings (like "firefox") to open things other than terminals.

Obviously, this isn't a crucial thing. Its just one of those things that would be convenient. Especially when you have lots of windows spread across 3 screens. I can see it getting a little tedious.

Any suggestions would be greatly appreciated.

4

1 回答 1

0

好的,到目前为止,我已经设法弄清楚了这一点。

xdotool过去常常通过 shell 脚本向 X 发出命令。它必须在登录时运行。(我必须手动进行,但我认为那是 bc Ubuntu 很愚蠢) 下面的示例切换到选项卡式布局,使用 dmenu 搜索 gnome-terminal,打开它,然后运行archey​​.

xdotool key Alt_L+w
xdotool key Alt_L+d
xdotool type gnome-terminal
xdotool key Return
sleep .5  #small delay to allow terminal to open
xdotool type archey
xdotool key Return

用于xev确定关键代码是什么。由于某种未知原因xdotool key Alt_L+Return,没有打开新终端...

显然,根据需要更改您的内容,但这似乎有效。

我希望这可能对某人有用。

于 2013-08-26T20:56:33.187 回答