【问题标题】:How can I get the number of Firefox windows currently opened?如何获取当前打开的 Firefox 窗口数量?
【发布时间】:2014-07-29 13:22:08
【问题描述】:

我试过xdotool search --name firefox | wc -l,但当只打开一个窗口时,它会显示奇怪的数字,例如 8,11 或更多。有任何想法吗?谢谢!

【问题讨论】:

  • this 你在看什么!
  • 是否可以使用 xdotool 来做到这一点?
  • 抱歉,我没有为此使用 xdotool。可能是其他人可以帮助您,xdotool 能够完成这项工作。
  • 好的,谢谢! :D........

标签: firefox xdotool


【解决方案1】:

尝试使用选项 --onlyvisible。像这样:

xdotool search --onlyvisible --name firefox | wc -l

它在这里工作。也许它也对你有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-31
    • 2010-09-08
    • 1970-01-01
    相关资源
    最近更新 更多