Created
March 29, 2014 15:45
-
-
Save blueyed/9856840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
local gears = require("gears") | |
local _dbus = dbus; dbus = nil | |
local naughty = require("naughty") -- XXX: if loaded (with dbus available), notifications do not go to dunst/notify-osd anymore | |
dbus = _dbus | |
-- Debug function. Set focusstyle.debug to activate it. {{{2 | |
local gears = require("gears") | |
local bdebug_level = 10 -- display all | |
bdebug = function(data, tag, level, timeout) | |
local level = level or 1 | |
local tag = tag or type(data) | |
local timeout = timeout or 0 | |
-- bnote(gears.debug.dump_return(data, tag), level, timeout) | |
print("----- " .. os.date("%Y-%m-%d %H:%M:%S")) | |
gears.debug.dump(data, tag) | |
end | |
bnote = function(s, timeout) | |
local level = level or 1 | |
local timeout = timeout or 30 | |
-- if not bdebug_level or bdebug_level < level then | |
-- return | |
-- end | |
naughty.notify({ | |
text = s, | |
timeout = timeout, | |
font = "monospace 10", | |
}) | |
end | |
bdump = function(data, tag) return gears.debug.dump_return(data, tag) end | |
-- }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment