diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 98cf9f32..619ddd91 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -33,8 +33,6 @@ module("naughty") -- Default: { "/usr/share/pixmaps/", } -- @field icon_formats List of formats that will be checked by getIcon() -- Default: { "png", "gif" } --- @field default_preset Preset to be used by default. --- Default: config.presets.normal -- @field notify_callback Callback used to modify or reject notifications. -- Default: nil -- Example: @@ -75,10 +73,10 @@ config.presets = { } } --- @name config.defaults --- holds the default values for the parameters to @see notify(). These --- can optionally be overridden by specifying a preset (@see config.presets) --- @class table +--- Default values for the params to notify(). +-- These can optionally be overridden by specifying a preset +-- @see config.presets +-- @see notify config.defaults = { timeout = 5, text = "", @@ -292,7 +290,7 @@ function notify(args) end -- gather variables together - local preset = util.table.join(config.default_preset or {}, + local preset = util.table.join(config.defaults or {}, args.preset or config.presets.normal or {}) local timeout = args.timeout or preset.timeout local icon = args.icon or preset.icon @@ -505,7 +503,7 @@ end -- Notify if capi.dbus then capi.dbus.connect_signal("org.freedesktop.Notifications", function (data, appname, replaces_id, icon, title, text, actions, hints, expire) - args = { preset = config.default_preset } + args = { } if data.member == "Notify" then if text ~= "" then args.text = text