Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
883 B

2 years ago
  1. local naughty = require("naughty")
  2. local debug = {}
  3. -- from (https://www.reddit.com/r/awesomewm/comments/te49nb/why_does_awesomes_ram_consumption_get_higher_and/)
  4. function debug.print_awesome_memory_stats(message)
  5. print(os.date(), "\nLua memory usage:", collectgarbage("count"))
  6. out_string = tostring(os.date()) .. "\nLua memory usage:"..tostring(collectgarbage("count")).."\n"
  7. out_string = out_string .. "Objects alive:"
  8. print("Objects alive:")
  9. for name, obj in pairs{ button = button, client = client, drawable = drawable, drawin = drawin, key = key, screen = screen, tag = tag } do
  10. out_string =out_string .. "\n" .. tostring(name) .. " = " ..tostring(obj.instances())
  11. print(name, obj.instances())
  12. end
  13. naughty.notify({title = "Awesome WM memory statistics " .. message, text = out_string, timeout=20,hover_timeout=20})
  14. end
  15. return debug