从命令行隐藏 xfce4-panel

发布于 2024-09-24 01:16:48 字数 65 浏览 0 评论 0原文

有没有办法从命令行隐藏 xfce4-panel。如果没有其他解决方案如何从终端隐藏它?

问候, 莱文

Is there a way to hide xfce4-panel from command line. If no any other solutions how to hide it from terminal ?

Regards,
Levon

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟花易冷人易散 2024-10-01 01:16:48

我来到这里也有同样的疑问。显然没有直接命令,但编写 shell 脚本非常简单:

INFO=$(xwininfo -name xfce4-panel)
STATE=$(echo "$INFO" | grep "Map State:" | head -n1 | awk -F: '{print $2}' | xargs)
WID=$(echo "$INFO" | grep "Window id:" | head -n1 | awk -F: '{print $3}' | awk '{print $1}')
if test "$STATE" = "IsViewable"; then
  xdotool windowminimize "$WID"
else
  xdotool windowmap "$WID"
fi

I got here wondering the same. Apparently there is no direct command, but it's pretty straightforward to write a shell script:

INFO=$(xwininfo -name xfce4-panel)
STATE=$(echo "$INFO" | grep "Map State:" | head -n1 | awk -F: '{print $2}' | xargs)
WID=$(echo "$INFO" | grep "Window id:" | head -n1 | awk -F: '{print $3}' | awk '{print $1}')
if test "$STATE" = "IsViewable"; then
  xdotool windowminimize "$WID"
else
  xdotool windowmap "$WID"
fi
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文