protocol to speak to them. Given a textbox widget definition like this:
textbox mail {
default = 0
}
textbox time {}
We can update the boxes individually by going:
echo 0 tell_widget mail 10
echo 0 tell_widget time 12:01
Text boxes will dynamically resize to fit their contents. A textbox can be
cleared by going:
echo 0 tell_widget name
A text-box containing no text will take up 0 space in the bar, i.e. it will not
be visible at all
Textboxes now supersede statusbar_set_text, so this call has been removed.
The tags member of screen is no longer an array but a linked list, thus
tags[0] (used in config.c) is ok since tags points to the first tag
struct, but tags[i], i>0 is wrong. There is one such use in
handle_event_buttonpress, causing awesome to segfault when pressing with
the mouse on the statusbar. The attached patch fixes this.
- rename parse_config to config_parse
- move KeyModList and ButtonList in their own functions
- move LayoutsList in layout.c
- move static fcts around in config.c
The problem is as follows. In the end, different types of widget are going to
have distinct configurable options. This means that we need to have a
different section type for every widget type, if we are ever to make the
configuration nice. In fact, a configuration syntax like this would suit us
very well:
textbox name {
foo = bar
}
focuslist name2 {
bar = voing
}
This is all very well, but libconfuse has a limitation - there is no "nice"
way to retrieve the order of disparate sections (i.e. sections of different
types), and order is important to us. This patch goes to some effort to
retrieve the section order by extracting an array of widgets, and sorting them
based on line number.
The big change here is that we now keep our configuration structure in a global
variable called globalconf. This radically simplifies many interfaces, since
passing awesomeconf everywhere is no longer necessary. There are also more
subtle interface effects - now we can reliably identify a screen from just a
screen ID, rather than an awesomeconf, screenid tuple.
Overall, this patch makes most of the interfaces in awesome much nicer to use -
enjoy!
Yes, this is a huge patch, but since a lot of the refactoring was done
systematically using vim macros, splitting this up would have been very hard.
We now have the beginnings of a flexible widget structure for the statusbar.
For now, there is no behavioural change, and the interface is a bit crude, but
watch this space!
This a preparatory patch. Refactor statusbar.c to compartmentalise the drawing
of the statusbar "widgets". We can now begin to see what a generalised widget
drawing interface would look like.
Note that at the moment we don't gracefully handle situations where "widgets"
run out of space. That will come as we generalise from here.
- reloadconfig never worked properly. There were a number of circumstances
under which it would crash awesome.
- reloadconfig always leaked memory, because our cleanup process was never
perfect. Making it perfect would be Hard.
- Just exec-ing awesome over the top of itself is an OK solution. Maybe we
should add a uicb_restart to do this so users don't have to think about
uicb_exec.
This is a big patch that does not change any behaviour. We abstract the data
needed by the draw.c functions into a context object, and pass that around
instead of passing each argument every time. This results in a much cleaner API
- most functions lose 3-4 arguments.
This is a preparatory patch for further work on statusbar.