Hi,

my two cents here: (Almost) every time I upgrade awesome-git I have to
adjust my config file, because something changes (statusbar to wibox
etc...). While I understand these changes (improvements], I never do change
stuff like my key bindings.

If awesome would by default mind 2 rc files, one for configuration and
second to apply it, it wouldn't break my awesome with every change of how
awesome expects it's interface to be built.

We would have one file with stuff like:
bindings.functions = {
    -- tag
    [{ mod.win, 'q' }] = eminent.tag.prev,
    [{ mod.win, 'w' }] = eminent.tag.next,
    [{ mod.win, 'Escape' }] = awful.tag.history.restore,
    [{ mod.win, key.tag.inc }] = function () awful.tag.incmwfact(-0.05) end,
    [{ mod.win, key.tag.dec }] = function () awful.tag.incmwfact(0.05) end,
    [{ mod.win_ctrl, key.tag.inc }] = function () awful.tag.incncol(1) end,
    [{ mod.win_ctrl, key.tag.dec }] = function () awful.tag.incncol(-1) end,
    [{ mod.win_shift, key.tag.inc }] = function () awful.tag.incnmaster(1)
end,
    [{ mod.win_shift, key.tag.dec }] = function ()
awful.tag.incnmaster(-1)end,
}

followed by (later in rc.lua):
for bind, func in pairs(bindings.functions) do
    keybinding(bind[1], bind[2], func):add()
end

Better example here would be loop building wiboxes:
-- Create a wibox for each screen and add it.
for s=1, screen.count() do
    ...
    mywibox[s].widgets = {
        mylauncher,
        mylayoutbox[s],
        mytaglist[s],
        mytasklist[s],
        mypromptbox[s],
        s == 1 and mysystray or nil, -- I don't use <>1 screens
        datewidget
    }
    mywibox[s].screen = s
end

Repaced by:
config part:
widgets_for_screens = {
    some_widget,
    another_widget,
    etc_widget
}
rc.lua part:
for s=1, screen.count() do
    ...
    mywibox[s].widgets = widgets_for_screens[s]
    mywibox[s].screen = s
end

Now I wouldn't mid how rc.lua builds my wibox as long as it accepts same
format of table structure to build it (and I'd say this doesn't change very
often for widget types etc.).

David

On Mon, Oct 27, 2008 at 4:23 PM, tycho garen <[EMAIL PROTECTED]> wrote:

> On Sat, Oct 25, 2008 at 02:59:39PM -0700, F??lix C. Morency wrote:
> > This proposal has already been discussed on IRC few months ago and
> rejected.
> > It would simply make the config. file deployment harder and you need to
> keep
> > in mind that this approach is heavily based on sequential coupling (i.e.:
> > the order in which you include each of the config. modules _is_
> important).
> > At a certain extent, it could make the whole configuration thing harder
> to
> > follow for the mind (i.e.: spagetti-type code).
>
> Ah, I understand your reassigning here, and I think this makes for a
> brilliant
> reason to not ship awesome with segmented config files, but I still think
> that
> it might make it easier for some people to conceptualize different parts of
> the configuration process. Maybe I could prepare tar balls of split
> configuration files (mine and the default) and offer them with a warning
> about
> the execution order issue, and instructions for deployment?
>
> There are trade-offs, certainly, but I think as an option? Particularly if
> a
> steep adjustment is something that new users are intimidated by, this might
> make sense as an option.
>
> I'll pull something together either later today or on wednesday
>
> cheers,
> tycho
>
> --
> To unsubscribe, send mail to [EMAIL PROTECTED]
>

Reply via email to