stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Placement rules, automatic group create/restore


From: Shawn
Subject: Re: [STUMP] Placement rules, automatic group create/restore
Date: Tue, 15 Jul 2008 13:31:05 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Morgan Veyret <address@hidden> writes:

Hi Morgan,

> Hello,
>
> The following serie of patches add automatic group create/restore
> functionnalities to window placement routines.

Sorry for the delay in getting back to you. When I saw 4 patches I
assumed it was a big gnarly patch and avoided it as long as I
could. It turns out, the patch is fairly modest. Next time, can you
send a single final patch instead of the intermediate patches? That
would make it easier for me to review it and keep my nerves at ease :).

I have some questions about your patch.

Where does the group get automatically dumped? I can't seem to find it.

Why not simply call (restore-desktop "~/mydesktop.dump") at the end of
your rc file? I suppose it's nice that it's automatic...

Here are some notes I took while looking at the patch:

> It add one parameter:
> *group-dump-dir* which should point to a directory containing dumped
> frames to restore if needed.

This is a good thing to have! I added a macro and variable,
with-data-file and *data-dir*, that can be used to store stumpwm
relevant data.

> And three parameters to rule definition:
> :dump-name: key parameter defining the dump file to restore instead of a
> one with the group name.

Why is this in the frame rule? It seems like it should be stored per
group somehow, not per frame.

> create: when set, a new group is created as needed and if a dump file
> named as the group exists it is used to restore the group layout.
> restore: force layout to be restored even if the group exists (this may
> be used along with :dump-name option)

I think it would be best for backwards compatibility if these were
keyword arguments so that existing define-frame-preference calls
aren't broken.

In get-window-placement, you do:

(if group
    ...
    (if create
        ...
        ...))

In this case you should use a cond:

(cond (group
       ...)
      (create
       ...)
      (t
       ...))

-Shawn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]