Hi,

FWIW, this is the patch from
http://article.gmane.org/gmane.comp.window-managers.ion.general/3917
ported to the current snapshot.

ingo


--- share/ioncorelib.lua        2003-08-07 09:24:03.000000000 +0200
+++ /usr/local/share/ion-devel/ioncorelib.lua   2003-08-07 22:29:47.000000000 +0200
@@ -252,11 +252,18 @@
 function get_winprop(cwin)
     local id=cwin:get_ident()
     local prop
+    local names
     
     for c, r, i in alternative_winprop_idents(id) do
-        if pcall(function() prop=winprops[c][r][i] end) then
-            if prop then
-                return prop
+        if pcall(function() names=winprops[c][r][i] end) then
+            if names then
+                for name in names do
+                    if string.find(cwin:name(), name) then
+                        return winprops[c][r][i][name]
+                    end
+                end
+                -- no regexp match, use default winprop
+                return winprops[c][r][i][" ! "]
             end
         end
     end
@@ -269,17 +276,20 @@
     if not winprops[class][role] then
         winprops[class][role]={}
     end
+    if not winprops[class][role][instance] then
+        winprops[class][role][instance]={}
+    end
 end    
 
-local function do_add_winprop(class, role, instance, props)
+local function do_add_winprop(class, role, instance, name, props)
     ensure_winproptab(class, role, instance)
-    winprops[class][role][instance]=props
+    winprops[class][role][instance][name]=props
 end
 
 --DOC
 -- Define a winprop. For more information, see section \ref{sec:winprops}.
 function winprop(list)
-    local list2, class, role, instance = {}, "*", "*", "*"
+    local list2, class, role, instance, name = {}, "*", "*", "*", " ! "
 
     for k, v in list do
        if k == "class" then
@@ -288,12 +298,14 @@
            role = v
        elseif k == "instance" then
            instance = v
+       elseif k == "name" then
+           name = v
        else
            list2[k] = v
        end
     end
     
-    do_add_winprop(class, role, instance, list2)
+    do_add_winprop(class, role, instance, name, list2)
 end
 
 -- }}}

Reply via email to