如何检查i3中是否打开了任何窗口

时间:2018-07-15 15:33:16

标签: window-managers arch i3

如何确定i3中是否打开了任何窗口?像,检查是否有任何工作区包含任何窗口。

2 个答案:

答案 0 :(得分:2)

您可以使用submitCheck: function() { let login = document.getElementById("input-login").value let pass = document.getElementById("input-pin").value EventBus.$emit('loaderStart'); $.ajax( { url: "http://192.168.0.14/game/src/server/Action.php", method: "POST", data: { action: "authUser", login: login, pass: pass } } ).done( data => { console.log(data) $.ajax( { url: "http://192.168.0.14/game/src/server/loginStatus2.php", method: "POST" }).done( data => { console.log(data)}) }).catch(error => {console.log(error)}) } 检查i3中是否打开了任何“可见”窗口: 您可以使用xdotool

安装xdotool
sudo pacman -S xdotool

答案 1 :(得分:0)

也许尝试i3-save-tree。您必须先安装perl-anyevent-i3perl-json-xs

https://i3wm.org/docs/layout-saving.html

示例:

$ i3-save-tree --workspace 10
// vim:ts=4:sw=4:et
{
    "border": "pixel",
    "current_border_width": 1,
    "floating": "auto_off",
    "geometry": {
       "height": 720,
       "width": 1366,
       "x": 0,
       "y": 0
    },
    "name": "Waterfox Start Page - Waterfox",
    "percent": 1,
    "swallows": [
       {
       // "class": "^Waterfox$",
       // "instance": "^Navigator$",
       // "title": "^Waterfox\\ Start\\ Page\\ \\-\\ Waterfox$",
       // "transient_for": "^$",
       // "window_role": "^browser$"
       }
    ],
    "type": "con"
}