自动关闭标题为 'Error' 的窗口的脚本

以下脚本将使用 wmctrl 关闭所有标题为 “Error” 的窗口。确保你的系统上已安装 wmctrlsudo apt -y install wmctrl)。

close_error_windows.sh
wmctrl -l | grep "Error" | awk '{print $1}' | xargs -I {} wmctrl -i -c {}

Check out similar posts by category: Linux