From 648541413429f405df2d7ab94a03e75b39dd0b23 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 11 Sep 2016 10:09:42 +0200 Subject: [PATCH] print_table debug function --- .config/awesome/rc.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index f0b12bf..d262bf7 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -93,6 +93,19 @@ local function client_menu_toggle_fn() end end end + +local function print_table(tbl, indent) + if not indent then indent = 0 end + for k, v in pairs(tbl) do + formatting = string.rep(" ", indent) .. k .. ": " + if type(v) == "table" then + print(formatting) + print_table(v, indent+1) + else + print(formatting .. tostring(v)) + end + end +end -- }}} -- {{{ Menu -- 2.39.5