Only the indices are different between the big / little endian versions of this
loop, so just move the indices into local variables and we are done.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
If this is set to true (default is false), then the graph widget automatically
scales its content to make it fit exactly. If "max_value" is also set, this is
the minimum "height" the graph will use.
This can be useful for graphes which monitor things like network bandwidth
which can vary a lot.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
If a wibox with non-north position was created and a wibox size was specified,
this function happily ignored it when it made the wibox fit.
Thanks to Garoth who found this bug.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
We can't use libev's signal handling here but have to use sigaction() directly,
because libev only writes to a pipe in the real signal handler and then calls
our callback in the next main loop iteration.
The problem here is that returning from a SIGSEGV signal handler is a in
general a Bad Idea (tm) and thus we need to use a "direct" signal handler.
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>
This patch fixes a bug and changes the position handling for wiboxes:
The bug was that awful.wibox.set_position() didn't update the cached
wibox position, i.e. the wibox was moved, but the position value in the
wiboxes table stayed the same
The change in position handling was that unknown positions (i.e.
"fnord") default to "floating"
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This prevents viewprev/viewnext from cycling to tags not shown in the
taglist.
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This allows setting 'hide' property for a tag to prevent it from
showing in the taglist.
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
Before this, setting w.opacity of a wibox that was not attached to some screen
had no effect, now this is cached and applied when the wibox is attached to
some screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Technically setting the opacity of an invalid window doesn't hurt, but
still it's nicer to catch this instead.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
This commit adds a function called extents() to widgets. In the case of
a systray, it takes the systray's screen as its argument to correctly
calculate the width. By default, 1 is assumed. For all other widgets,
the argument can be ommitted.
The function doesn't return the geometry as drawn, instead it returns
the geometry the widget _wants_ to be drawn at, for example an imagebox
always has (image width, image height) as the return values even if it's
drawn with a smaller width and height on a smaller wibox.
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>