Actions extensions in File Manager

PCMan pcman.tw at gmail.com
Sat Feb 6 20:46:06 PST 2010


Generally speaking, the spec is already quite complete. Congratulations!
I'm willing to support this in PCManFM, the file manager of LXDE.
So once this spec is finished, it will at least be supported by two DEs. :-)
Here are some comments:
1. ExecutionMode seems to be weird.
    Terminal is already defined in DES by the key 'Terminal'.
    Minimized or Maximized state of applications cannot be controlled by us.
    It's controlled by window managers. So I don't see any way to
implement this correctly.

2. ExecuteAs:
    This should be added to DES rather than file manager actions.
    Please make a patch to DES.

3. ForEach is redundant.
    Exec key itself can help differentiate this by checking %f, %F, %u, or %U.
    If you need for each, %f and %u should be used in Exec. Otherwise,
use %F and %U.

4. ItemsList:
    For me, ItemsList=`command to execute`; is more readable than
GetItemsList=command.
    An even more powerful syntax is:
    ItemsList=item1.desktop;item2.desktop;`command1
arg1`;item4.desktop;`command2 arg2`;
    So part of the list is static, and part of it is generated dynamically.

5. ShowIfRegistered, ShowIfTrue, ShowIfRunning:
    What will happen is all of them are defined in the action, but
each of them gives opposite result?
    Are those keys mutual-exclusive, or should be combined with 'OR'?
    The default state of action should be visible to the user if
NoDisplay or Hidden are not true.
    But when ShowIfTrue is defined, it implies that if this returns
false, the item should be hidden. I guess when those three keys are
defined together, there results should be combined with boolean OR. If
the combined result returns false, the item should be hidden. This
should be addressed in the spec.

6. SelectionCount:
    When will we have a condition that SelectionCount=0?
    Aren't those actions applies to selected files only?

7. Schemes:
    We need to initiate another "Desktop Schemes" spec to define some
standard schemes.
    Non-standard schemes like computer:///, trash:/// or smb:///
should be well-documented in specs.

8. Folders:
    Folders needs to support ! to negate specific folders, too.

9. Parameters:
    Please explain the use case of %w and %W.
    I doubt this is rarely needed.
    Besides, those parameters should apply to any key in this spec
requiring a command line, not only the Exec key. This should be
addressed in the spec.

10. Special case:
    When an action desktop file only contains one profile, most of the
keys in [Desktop Entrty] and X-Action-Profile profile_id] are
duplicated. For example, a simple action used to open a folder in
terminal emulator. IMHO, the values in profile should direcly be
defined in [Desktop Entry] instead. In this way, the desktop file only
requires half of its original size, but can still contain all the
required data.

In my opinion, this spec is quite complete, but it's a little bit too
complicated to implement.
Is there anyway to make it simpler?

In addition, since both of us plan to implement this, is it possible
for us to write a library for the spec together? (A library based on
glib only in order to be used in projects other than nautilus)

As more and more desktop files are installed for those actions,
parsing requires more and more time. Is there any better way to cache
the parsed result to speed up loading, just like what
desktop-file-utils does?


On Wed, Feb 3, 2010 at 7:49 PM, Pierre Wieser <pwieser at trychlos.org> wrote:
>
> ----- "Pierre Wieser" <pwieser at trychlos.org> a écrit :
>
>> I believe we have now covered almost if not all all aspects of such a
>> specification, don't we ?
>
> It appears there were some lacks anyway ;)
>
> I just made the following adds:
> - Add Type key for distinguishing Actions from Menus.
> - Specifies what to do with present, but not listed, profiles.
> - Specifies defaults for TryExec, ShowIfRegistered, ShowIfTrue, ShowIfRunning, MimeTypes, SelectionCount, Schemes, Capabilities keys.
>
> I've so updated the draft to a version 0.6.
> It is always available at http://www.nautilus-actions.org/?q=node/377.
>
> Your comments are always welcomed.
> Best regards
> Pierre
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>


More information about the xdg mailing list