On 2008-09-20, Timandahaf <[EMAIL PROTECTED]> wrote: > This does what I want, except for the fact that it doesn't update the > statusbar. (I use statusbar_workspace.lua and have > "template=%workspace_pager" set). The statusbar does get updated > correctly whenever I next do anything that would normally update it. > > How would I get the statusbar to update after rearranging my workspace?
The hook usage of statusbar_workspace.lua is quite bad. It only listens to region_notify_hook, which is used to notify of all sorts of changes (non-structural, aside from setting the manager) to a region, and has a parameter describing this change. statusbar_workspace.lua ignores the parameter, thus doing lots of useless work when nothing has changed that it should be interested in. It only incidentally works, I guess, because mapping state is notified by this hook. What it should really do is: a) listen to screen_managed_changed_hook (RTFM for details) for structural changes, and b) listen to region_notify_hook with detail "name" for workspace name changes. -- Tuomo
