Hi there,

I will see this week if I can undust the startup notification patch. With
those 2 I should be able to implement proper Tyrannical serialization*. I
guess I will have to save the state to a file or gsettings. I don't think I
can trust X to properly preserve a serialized lua table.

But would it be better to simply be able to access random xprops from lua
rather than having to patch awesome everytime we want a new one?

*That also imply that I will branch Tyrannical as it wont work with 3.5.2
anymore.


On 23 February 2014 06:32, Uli Schlachter <[email protected]> wrote:

> Hi,
>
> On 05.12.2013 22:16, Uli Schlachter wrote:
> > On 03.12.2013 11:06, Stanislav Ochotnicky wrote:
> >> Quoting Uli Schlachter (2013-12-03 08:54:22)
> >>> On 02.12.2013 23:39, Stanislav Ochotnicky wrote:
> >>>> Quoting Uli Schlachter (2013-12-02 22:57:58)
> >>> [...]
> >>>>> I hope this clears up the current state. Feel free to come up with
> suggestions
> >>>>> on how to improve this.
> >>>>
> >>>> Thanks for quick reply. I don't think it makes sense to complicate
> core awesome
> >>>> codebase by introducing custom X property. It *would* be nice if
> completely full
> >>>> dynamic tagging would be easily possible but that's not really a
> discussion for
> >>>> this thread :-)
> >>>
> >>> I just thought about adding a "blob" property which contains just a
> random
> >>> string that is completely uninterpreted by awesome, but could be
> accessed by
> >>> lua. This blob would however need a better name than just "blob", of
> course.
> >>>
> >>> This isn't much work on the C side and shifts the problem into
> lua-land (aka "no
> >>> longer my problem" ;-) ).
> >>>
> >>>
> >>> If it were called "blob", I would save it in "AWESOME_BLOB" and have it
> >>> accessible as c.blob. There are some obvious problems like "who
> controls the
> >>> blob" where different modules both would want to save stuff in there.
> If this
> >>> should be solved, then "blob" would not only need a way better name,
> but would
> >>> also need to be a table. And I would have to think about how to
> serialize a lua
> >>> table into an X11 property...
> >>
> >> I am not sure about maximum size of X11 property but I can imagine few
> use cases
> >> (mostly around preserving state between restarts, saving, restoring,
> maybe
> >> profiles?)
> >
> > Good question. The only thing I found in the docs:
> >
> > "The maximum size of a property is server-dependent and may vary
> dynamically."
> >
> > Anyway, attached is a patch which implements a "blob" property on
> clients. This
> > is a string that survives restarts. Of course, this needs some helper
> functions
> > in awful so that more than one thing can be saved in here. No idea about
> the
> > format for this and too lazy to think about it.
> >
> > So this patch is just a proof of concept that people can experiment
> with. Also,
> > I still don't like the name "blob".
> >
> > [...]
> >>> What do you guys think?
> >>
> >> I'd welcome uncle blob with open arms. I believe a nice Lua access API
> will be
> >> needed but that's a separate point...
> >
> > Looking forward to someone implementing this. :-)
>
> Just pushed a commit to git which adds the c.blob property. Not much
> changed,
> except that the X11 property is now called AWESOME_NAQUADAH_BLOB to have
> less
> changes of name collisions.
>
> Still looking forward to someone implementing some nice lua API on top of
> this.
>
> Cheers,
> Uli
>
> P.S.: All code that messes with c.blob directly will be shot. We really
> need
> some nice lua API for this that avoids collisions and is nicer than "just
> a string"!
> --
> "In the beginning the Universe was created. This has made a lot of
>  people very angry and has been widely regarded as a bad move."
>
> --
> To unsubscribe, send mail to [email protected].
>

Reply via email to