From 9adf371e9523beb801b5861338ae1a0174300574 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 5 Jul 2013 10:33:05 +0200 Subject: [PATCH] flash: correct how fullscreen PPAPI Flash is detected by shifty `config.apps` can now use a function to do detection. --- lib/shifty.lua | 5 +++++ rc/rules.lua | 1 + rc/tags.lua | 9 ++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/shifty.lua b/lib/shifty.lua index 37e7077..f363459 100644 --- a/lib/shifty.lua +++ b/lib/shifty.lua @@ -497,6 +497,11 @@ function match(c, startup) for i, a in ipairs(config.apps) do if a.match then local matched = false + -- match function + if not matched and a.match.check then + matched = a.match.check(c) + end + -- match only class if not matched and cls and a.match.class then for k, w in ipairs(a.match.class) do diff --git a/rc/rules.lua b/rc/rules.lua index 3c7e6e9..95e7908 100644 --- a/rc/rules.lua +++ b/rc/rules.lua @@ -30,6 +30,7 @@ awful.rules.rules = { properties = { floating = true }}, -- Flash with Firefox { rule = { instance = "exe", class = "Exe" }, properties = { floating = true }}, -- Flash with Chromium + -- See also tags.lua -- Pidgin { rule = { class = "Pidgin" }, except = { role = "buddy_list" }, -- buddy_list is the master diff --git a/rc/tags.lua b/rc/tags.lua index 69dc201..eccf5ba 100644 --- a/rc/tags.lua +++ b/rc/tags.lua @@ -70,7 +70,14 @@ shifty.config.apps = { { match = { class = { "Keepassx", "Key[-]mon" }, role = { "pop[-]up" }, - name = { "Firebug", "Chromium" }, + name = { "Firebug" }, + check = function (c) + return awful.rules.match(c, + { instance = "chromium", + class = "Chromium", + name = "Chromium", + fullscreen = true }) + end, instance = { "plugin[-]container", "exe" } }, intrusive = true, },