summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rc.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/rc.lua b/rc.lua
index 23702d9..b0809ea 100644
--- a/rc.lua
+++ b/rc.lua
@@ -189,3 +189,23 @@ client.connect_signal("mouse::enter",
end)
-- }}}
+
+-- show a notification on changing tag properties
+do
+ local tag_prop_notify = {
+ master_count = {},
+ column_count = {},
+ }
+
+ for name, tbl in pairs(tag_prop_notify) do
+ tag.connect_signal('property::' .. name,
+ function(tag)
+ local args = { title = name, text = tostring(tag[name]), timeout = 2 }
+ if tbl.notification and tbl.notification.box.visible then
+ args.replaces_id = tbl.notification.id
+ end
+
+ tbl.notification = naughty.notify(args)
+ end)
+ end
+end