Hi Abhijeet,
I don't think it is lame to ask.

Awesome wiki documents signals. If argument type not specified I guess
it is generic and may change, I mean emitted with different arguments
in different contexts. It is best to search within awesome source to
find where it is emitted with which arguments, to be sure.
http://awesome.naquadah.org/wiki/Signals

In your first code block, you are passing awful.button a "press
callback". It actually adds a "press" signal (in awful/button.lua), it
is emitted with an object as argument (in awful/widget/commons.lua
list_update) "When bound mouse button + modifiers are pressed."
according to wiki. And this object is a "client object" for "tasklist"
(see in  awful/widget/tasklist.lua tasklist_update). It may be
something different elsewhere and I think it is not documented.

debug::error is emitted in luaa.c with error string. In fact I did not
track it, just read the comment.

On 11 April 2012 18:06, Abhijeet Rastogi <[email protected]> wrote:
> Hi guys,
>
> I wanted to add a feature like doing a right click in tasklist to close a
> particular window. (I liked this feature from openbox)
> So, I went ahead and modified
>
> mytasklist = {}
> mytasklist.buttons = awful.util.table.join(
>                              .....
>                              .....
>                        awful.button({ }, 3, function (c)
>                                                        c:kill()
>                                          end),
>                              .....
>                              .....
>                             )
>
> I am no prior experience with lua and have just seen a basic tutorial. I
> just edit it looking at the API reference & looking the nearby code. (Thing
> I did is like a "hello world" of configuration, anyways)
> But, I have problem understanding how I got access to the active client
> object in the function. I mean, I can see that the function has c as
> parameter but still I couldn't find in the documentation as to what
> arguments of function should be.
>
> Similar is the case with this snippet.
>
> -- Handle runtime errors after startup
> do
> local in_error = false
> awesome.add_signal("debug::error", function (err)
>     -- Make sure we don't go into an endless error loop
>     if in_error then return end
>     in_error = true
>
>     naughty.notify({ preset = naughty.config.presets.critical,
>                      title = "Oops, an error happened!",
>                      text = err })
>     in_error = false
> end)
> end
> -- }}}
>
> When it's done awesome.add_signal, where is it documented that function's
> first argument err will contain the error text.
> This might be pretty lame to ask but I would really appreciate the help.
> Thanks in advance.
>
> --
> Regards,
> Abhijeet Rastogi (shadyabhi)
> https://plus.google.com/107316377741966576356/
>



-- 
Can Altıparmak

--
To unsubscribe, send mail to [email protected].

Reply via email to