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

Re: User directories integration - request for help

Le Ven 16 mars 2007 09:59, Alexander Larsson a écrit :

> The config is stored in a shell-style file to make it easier to read in
> a shell script:
> cat ~/.config/user-dirs.dirs
> # This file is written by xdg-user-dirs-update
> # If you want to change or add directories, just edit the line you're
> # interested in. All local changes will be retained on the next run
> # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
> # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
> # absolute path. No other format is supported.
> #
> ...

Alternate KISS implementation :

A. first time a GUI app needs MUSIC, DOWNLOAD or whatever open a file
selector allowing the user:
 b. to select the appropriate directory he created (and named) by other means
 c. or to create a new dir (with a default hint)
B. When a (pre)existing dir is selected create ~/.config/user-dirs/ (if it
does not exist)
C. put a MUSIC, DOWNLOAD or whatever symmlink there pointing to the user
D. when another app needs the same resource, have it follow the symlink if
it exists, else go to A

No pre-created directory skeleton, no renaming dance, no "MyFoo" structure
forced on the user, no file migration, just symlinks any GUI or CLI app
can find and follow

Nicolas Mailhot

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