上传文件至「bash」

This commit is contained in:
2026-07-25 14:43:03 +08:00
parent 499822a958
commit 98eae5e050
2 changed files with 256 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/bash
# 监控时间,50 * 0.1秒 = 5秒
MTIME=50
for ((i=0; i<${MTIME}; i++)); do
# 查询当前是否处于概览模式
read -r DUMMY DUMMY IS_OVERVIEW <<< "$(dbus-send --print-reply=literal --session --dest=org.gnome.Shell --type=method_call /org/gnome/Shell org.freedesktop.DBus.Properties.Get string:org.gnome.Shell string:OverviewActive)"
if [[ "${IS_OVERVIEW}" = "true" ]] ; then
# 如果处于概览模式,发送命令关闭它
/usr/bin/dbus-send --session --dest=org.gnome.Shell --type=method_call /org/gnome/Shell org.freedesktop.DBus.Properties.Set string:org.gnome.Shell string:OverviewActive variant:boolean:false
exit
fi
sleep 0.1
done