diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-06-13 13:53:27 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-06-13 13:53:27 +0200 |
commit | 7d64cce93bee8af0ef017ae5b56d9e5b5499d4f7 (patch) | |
tree | 45981f5bb70f9c71837ce24b53ab9181c9fd407f | |
parent | f683eb374f4f49f085e81b0a4e937e471cc1ee16 (diff) |
rc: notify on new values of tag properties
-rw-r--r-- | rc.lua | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 |