Commit Graph

61 Commits

Author SHA1 Message Date
Julien Danjou 7cc0b13eae wibox: move position handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:30 +02:00
koniu 2920ed71d7 naughty: environment cleanup
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>
2009-06-04 17:23:52 +02:00
koniu d397d72a8d naughty: simplify width/height calculations
This also fixes an issue with spacing calculation which previously
disregarded border_width.

Signed-off-by: koniu <gkusnierz@gmail.com>
2009-06-04 17:23:46 +02:00
koniu 4d60ad7e36 naughty: simplify notify and preset parameters
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>
2009-06-04 17:23:43 +02:00
koniu 80685be123 naughty: add vertical margin
Signed-off-by: koniu <gkusnierz@gmail.com>
2009-06-04 17:23:38 +02:00
Gregor Best a4de60b23f naughty: resize naughtifications to the minimum needed space
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>
2009-06-04 17:23:34 +02:00
koniu 35cd125ebd naughty: fix bug in re-indexing popups if removing older to make space
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-08 14:41:17 +02:00
Julien Danjou 3eb14d7c76 luaa: move version and release to awesome module
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 16:21:50 +02:00
Julien Danjou 467737250c dbus: allow usage of the system bus
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 16:07:31 +02:00
Uli Schlachter 4b83d526d6 naughty: fix typo
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 10:34:50 +02:00
Julien Danjou 21978546eb lib: fix libs to use new awful.button
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 18:08:52 +02:00
Gregor Best 680e51049e naughty: add opacity option
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 23:18:51 +02:00
Julien Danjou 031ebc6d98 naughty: add support for hints.icon_data
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:59 +01:00
Julien Danjou 311a485319 naughty: allow icon to be an image object
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:59 +01:00
Julien Danjou 8b79502302 naughty: return unsigned
Actually, libnotify expect an unsigned for the id, not a signed integer.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-23 15:32:24 +01:00
Julien Danjou 9554536db6 naughty: init preset
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-23 15:25:21 +01:00
Julien Danjou e0754de9cb naughty: set icon valign to center
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-05 18:10:19 +01:00
Julien Danjou e49ab302b9 naughty: do not export documentation of local functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-08 12:26:00 +01:00
Julien Danjou d74358a2b1 naughty: check for D-Bus availability
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-08 11:39:53 +01:00
Leon Winter ff0f15f9a0 naughty/GetServerInfo: act according spec
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-19 12:37:48 +01:00
Leon Winter 2d0c8940fe naughty: announce GetServerInfo over dbus
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-19 09:56:41 +01:00
Leon Winter 894f9c5439 naughty: fix returning correct awesome version
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-19 09:56:41 +01:00
Leon Winter fa41e0d395 naughty: return correct awesome version via dbus
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-18 09:56:28 +01:00
Leon Winter e8502a268f naughty: add callbacks for presets
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-18 09:56:05 +01:00
Maarten Maathuis 6e199bbd76 client, swindow: switch to a more convient definition of geometry
- 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>
2008-12-14 10:28:24 +01:00
Leon Winter 5f8b34b909 naughty: convert text and title tostring()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Leon Winter b4f0e90362 naughty: support for categories via mapping
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
koniu 49258e7805 naughty: notify{run} gets notification object argument (FS#398)
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>
2008-12-14 10:28:23 +01:00
Julien Danjou 8e9f0c8857 draw: remove margin markup, move to textbox widget
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Leon Winter 458ae34560 naughty: introducing urgency levels and presets
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:29 +01:00
koniu 03e08257fb naughty: notification.run destroys the popup
Popups that have mouse button 1 tied to a function (run) will be
destroyed upon execution.

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:29 +01:00
koniu 5603d93da6 naughty: hover_timeout can now be used in notify()
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:29 +01:00
koniu e1762128b7 naughty: bottom positioning has to count border twice
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:28 +01:00
koniu 61947ec1c8 naughty: fix a bug on timeout when popup was destroyed by hover_timeout
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:28 +01:00
Leon Winter 2d321ffbf8 naughty: add getIcon() to find icons with basename
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>
2008-12-12 19:19:28 +01:00
koniu 0358d1085d naughty: notify() returns notification object
This makes notification mangling outside of naughty.lua much easier:
http://awesome.naquadah.org/wiki/index.php?title=Naughty#Popup_calendar

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:28 +01:00
koniu 8599426168 naughty: never scale icon to text height
Also removes default icon_size of 16 to avoid confusion.

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:28 +01:00
Leon Winter 118fbcb985 naughty: add D-Bus notification support
Allows Naughty to receive D-Bus notifications and emulate notification-daemon
and such.

Signed-off-by: Leon Winter <leon.winter@informatik.uni-oldenburg.de>
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-12-12 19:19:28 +01:00
Julien Danjou 4fcf48e247 widgets: remove name property
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou c7ee83fdbf naughty: notify() returns notification object
This makes notification mangling outside of naughty.lua much easier:
http://awesome.naquadah.org/wiki/index.php?title=Naughty#Popup_calendar

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-25 09:47:46 +01:00
Julien Danjou 46822d510b naughty: fix font support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-21 14:41:03 +01:00
koniu 0e97360d32 naughty: fix a bug with variable width popups
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-21 09:21:20 +01:00
koniu 64f0848940 naughty: fix beautiful support properly
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-21 09:21:20 +01:00
koniu c453d6c611 naughty: arg 'screen' to notify() is now respected
Signed-off-by: Matthias Schroeder <ms@softimpulse.de>
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-20 20:36:05 +01:00
koniu 65d5e29141 naughty: new argument 'width' in notify()
Signed-off-by: Sébastien Gross <seb@chezwam.org>
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-19 10:50:19 +00:00
koniu 651b5e5f70 naughty: new config option 'margin' + 2 renamed
* Renamed config.margin to config.padding. Controls spacing between popup and
  workarea border.

* Renamed config.gap to config.spacing. Controls spacing between popups.

* Added config.margin. Controls spacing between popup wibox and text.

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-15 20:08:17 +00:00
koniu e536dbe2ea naughty: text-icon separator uses margin now
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-15 18:39:26 +00:00
koniu edeabd1a8b naughty: popup size can now adjust to icon height
* If icon is present, popup height will now be adjusted to the greater
  of text-height and icon-height.
* Reorganized notify() into more logical order to allow this.

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-15 16:55:38 +00:00
koniu 3cc64ab081 naughty: fix a bug in destroy()
+ hooks.timer.unregister gets notification.die not .timer
+ remove pointless comments

Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-15 15:25:22 +00:00
koniu c86b41235f naughty: check workarea in get_offset, not at load
Signed-off-by: koniu <gkusnierz@gmail.com>
2008-11-15 09:27:27 +00:00