At 1251821489 time_t, koniu wrote:
> Alternative solution is to catch these duplicates in
> awful.help.format.kb_list(), perhaps under condition that the
> modifiers might be different but keysym is the same + the
> doc.description is the same. This would add yet another loop to
> format.kb_list() which is already pretty loaded, which is why I chose
> this shortcut. I could try hack up duplicate detection tho.

Would be cleaner IMHO.

> My initial plan was to clearly split help generation into "frontend"
> and "backend" where everything is returned in some standard manner and
> then you can display it in naughty or just get a string or whatever.
> Eventually my awful.help functions ended up in having a load of pango
> markup so I just left naughty as a dependency. Having used it for more
> than 3 months now I have to say that I've experienced no ill-effects
> to that.

Well I am sure there's no ill effect, it's just a cyclic-dependency we
should try to avoid.

> What's your view?

Well, my view is rather more complicated than it should be,
and not only related to awful.doc.

The thing is that naughty is handling 2 things currently: wibox
creation, placement, etc and notification system (Lua + D-Bus).

What we're needing more and more inside awesome is not notification
itself, but wibox creation/placement handling. You need it for your
keybinding stuff in awful.doc. and for example, I'd need it if I wanted
to add a wibox with a mini-calendar when clicking on the awful.widget.textclock
there's on my wibox-statusbar.

So ultimately, naughty should be somehow splitted to handle notification
and use wibox creation/system from awful.

Ok, I know this is not gonna be solve the problem of awful.doc *right
now*, but that's currently how I see things.

Now, to solve *that* problem, there's 2 solution:
- move awful.doc outside awful, so it can depends on awful + naughty,
  which would on the same level as it;
- just implement a callback system where you give a function to
  awful.doc that will be called with text to be printed as argument.

> This is something I'm gonna be looking into. Also luadoc is pretty
> flexible and you can have any fields you want so perhaps we could look
> into closer integration.

Great idea. Keep me in touch. :)

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Anna Molly! Anna Molly! Anna Molly!

Attachment: signature.asc
Description: Digital signature

Reply via email to