Hi Cedric,

Sorry for the delay.

At 1253045240 time_t, Cedric GESTES wrote:
> +--- Get value from percentage, or just return value
> +...@param value The value, could be a percentage or an absolute value
> +...@param min The minimum (used for percentage)
> +...@param max The maximum (used for percentage)
> +...@return An integer value between min and max
> +function geometry_percentage(value, min, max)
> +    if type(value) == "string" then
> +        val,percent = value:match("(%d*) *(%%*)")
> +        if val and percent == "%" then
> +            return ((max - min) * val / 100) + min
> +        end
> +    end
> +    return value
> +end

This seems unrelated to geometry, so the name and module chosen to store
this funcion is not well.

> +data            = {}
> +--- Table of setter functions
> +data.set        = {}
> +--- Table of post setter functions
> +data.postset    = {}
> +
> +data.set.floating   = function(c, p, v) aclient.floating.set(c, v)      end
> +data.set.tag        = function(c, p, v) aclient.movetotag(v, c)         end
> +data.set.placement  = function(c, p, v) aplacement[v](c)                end

I find this one overkill. Doing that in callback should be enough.

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Don't give up.

Attachment: signature.asc
Description: Digital signature

Reply via email to