diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index e51c3a82..1a8b0a7a 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -11,6 +11,7 @@ local util = require("awful.util") local ascreen = require("awful.screen") local beautiful = require("beautiful") +local object = require("gears.object") local pairs = pairs local ipairs = ipairs local table = table @@ -873,6 +874,16 @@ function tag.mt:__call(...) return tag.new(...) end +-- Extend the luaobject +-- `awful.tag.setproperty` currently handle calling the setter method itself +-- while `awful.tag.getproperty`. +object.properties(capi.tag, { + getter_class = tag, + setter_class = tag, + getter_fallback = tag.getproperty, + setter = tag.setproperty, +}) + return setmetatable(tag, tag.mt) -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80