我需要一个可怕的规则(awesome-wm 4.X)来匹配网络浏览器的 javascript 对话框

我需要一个可怕的规则(awesome-wm 4.X)来匹配网络浏览器的 javascript 对话框

我需要帮助创建一个规则来匹配 javascript 对话框窗口,这里是 xprop 输出的一部分:

...
WM_CLASS(STRING) = "wb", "Wb"
WM_ICON_NAME(STRING) = "JavaScript - http://localhost/folder/map2.html"
_NET_WM_ICON_NAME(UTF8_STRING) = "JavaScript - http://localhost/folder/map2.html"
WM_NAME(STRING) = "JavaScript - http://localhost/folder/map2.html"
_NET_WM_NAME(UTF8_STRING) = "JavaScript - http://localhost/folder/map2.html"

浏览器窗口本身具有相同的类“Wb”,并且由于我只想匹配对话框窗口而不是浏览器窗口,所以我不能使用如下方法:

{ rule = { class = "Wb" }, properties = {floating = true}, callback = function(c) awful.placement.centered(c,nil) end},

我也无法尝试匹配名称,因为每个页面的名称都不同。我对 lua 不太熟悉,你能在规则中匹配子字符串吗,例如:

{ rule = { "JavaScript - http://" in name }, properties = {floating = true}, callback = function(c) awful.placement.centered(c,nil) end},

相关内容