Is a collection of helper for ricing/creation of AwesomeWM widgets/configs.
by rxi
simple but very useful logging lib
log = require ("log.log")
--- define logging
-- file path
log.outfile = os.getenv("HOME") .."/lua-log.log"
--possible log level - "trace" "debug" "info" "warn" "error" "fatal"
log.level = "debug"
Modes:
log.trace(...)
log.debug(...)
log.info(...)
log.warn(...)
log.error(...)
log.fatal(...)
by kikito
amazing lib for creation debug output for lua tables
inspect = require("inspect.inspect")
log.trace(inspect(stdout))
by intrntbrn
- Define your own icons for applications
- Set custom icons for terminal applications based on client title
by dkolf
easy encode/decode lua tables in json and vice versa
The same example below and more can also be found at the wiki of the author
local json = require ("dkjson")
local tbl = {
animals = { "dog", "cat", "aardvark" },
instruments = { "violin", "trombone", "theremin" },
bugs = json.null,
trees = nil
}
local str = json.encode (tbl, { indent = true })
print (str)
Output
{
"bugs":null,
"instruments":["violin","trombone","theremin"],
"animals":["dog","cat","aardvark"]
}
local json = require ("dkjson")
local str = [[
{
"numbers": [ 2, 3, -20.23e+2, -4 ],
"currency": "\u20AC"
}
]]
local obj, pos, err = json.decode (str, 1, nil)
if err then
print ("Error:", err)
else
print ("currency", obj.currency)
for i = 1,#obj.numbers do
print (i, obj.numbers[i])
end
end
Output
currency €
1 2
2 3
3 -2023
4 -4