2b69d333f8 added some code duplication here. I guess this was a
mis-rebase or something like that. Anyway, the width and height of the wibox is
already calculated right before this code snippet and the existing calculation
is even correct (now that the calculation for a wibox' geometry with
border_width was fixed up).
Tested via notify-send with and without icon.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
No idea where this comes from or why it worked before, but it's obviously wrong.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Remove an unused var and fix a reference to capi.awesome
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Makes naughty environment handling same as awful modules:
- relevant capi members all go to local capi = {}
- relevant awful members are all explicitly required
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This makes all parameters available to notify() to be available in
preset table (and vice versa) and simplifies value selection.
Adds new config option: config.default_preset.
Also cleans up some comment redundancy.
Signed-off-by: koniu <gkusnierz@gmail.com>
This commits adds support for :extents() to naughty. It changes the
behaviour of naughty.config.presets.*.width so that if it's set to nil,
the notification gets resized automagically. Else the value of width is
used for the notification's width.
The meaning of naughty.config.presets.*.height changed similarly, now,
if set, it means the literal height of the notifications. If unset, the
notification gets resized automagically as well.
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
- In many places i see people correcting for border width and titlebars.
- This new definition is the equivilant of what used to be fullgeometry.
- The internal geometry is now contained to a few functions that few people ever touch.
- This should avoid confusion and make code easier.
- Also protect against several unsigned overflows.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
Notifications will not be destroyed on 'run' execution unless the
provided 'run' function explicitly invokes die()/destroy(). For this
purpose run can now receive the notification object as argument.
naughty.notify{ text = 'hi',
run = function(n)
awful.util.spawn('firefox')
n.die()
end
}
Signed-off-by: koniu <gkusnierz@gmail.com>
Adds:
config.icon_dirs {}
config.icon_formats {}
"It adds the ability to search for icons in specified folders. This
is necessary for some applications using dbus like the firefox dbus
plugin."
To test it: naughty.notify{ icon = 'firefox' }
Signed-off-by: Leon Winter <Leon.Winter@informatik.uni-oldenburg.de>
Signed-off-by: koniu <gkusnierz@gmail.com>