我试图设置一个快捷键:
<代码>G 211
我所说的active指的是打开的活动窗口,而不是其他窗口的后面。
为此我成功地编写了这个脚本(注:我对bash脚本一无所知)
#!/bin/bash
if (ps aux | grep xfce4-terminal | grep -v grep > /dev/null)
then
if([xfce4-terminal is active])
then
xdotool windowminimize [xfce4-terminal]
else
xdotool [activate xfce4-terminal]
else
xfce4-terminal
exit 0
fi请注意:[]中所附的任何东西都是我想要达到的,但要知道使用什么命令。
然后,我将把这个脚本保存到一个文件中,并创建一个快捷键来运行这个文件并执行所需的任务。
发布于 2022-03-10 04:07:33
#!/bin/bash
if (ps aux | grep xfce4-terminal | grep -v grep > /dev/null)
then
title=$(xdotool getactivewindow getwindowname)
if [ "$title" = fullscreen ];
then
xdotool search --name fullscreen windowminimize
else
xdotool search --name fullscreen windowactivate
fi
else
xfce4-terminal --title=fullscreen --fullscreen --hide-menubar
fi已完成:)
https://stackoverflow.com/questions/71418182
复制相似问题