The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] A question about ls(1)
Date: Mon, 29 Apr 2019 15:32:19 -0700	[thread overview]
Message-ID: <20190429223226.303F9156E40C@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Mon, 29 Apr 2019 18:05:12 -0000." <20190429180512.q2jrlsyhvb7cx4ev@h-174-65.A328.priv.bahnhof.se>

On Mon, 29 Apr 2019 18:05:12 -0000 Michael =?utf-8?B?S2rDtnJsaW5n?= <michael@kjorling.se> wrote:
Michael Kj?rling writes:
> On 28 Apr 2019 13:00 -0700, from bakul@bitblocks.com (Bakul Shah):
> > IMHO separate files are fine but it would've been nice to
> > a) have a place other than $HOME to store these files and
>
> XDG already does that. At least Norman already mentioned ~/.config in
> this thread.
>
> https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
>
> Not sure how common that is on non-Linux systems, but it seems pretty
> common on modern Linux distributions.

I meant to suggest that a unix wide convention, with an API to
access config data from programs, may still be of some use.
This should contain user specific configuration in a few lines.

mh for example has a single per user config file: .mh_profile.
It allows you to specify your local maildir's path (defaulting
to ~/Mail). All mail messages and additional state/data is then
stored under ~/Mail or its subdirectories.

So something like "path: foo" can be used store application
specific stuff that doesn't fit in the minimal config model.
The goal would be to cover the majority of programs and
provide some guidelines for more complex applications.

> My workstation Debian system has a staggering 3467 files in that
> directory, spread around 444 directories (75 directories directly
> under ~/.config). Plus another 142 dot-directories and 66 dotfiles in
> ~/. Now, ~/.config typically uses multiple files per application, and
> at a glance there's some stuff there that could definitely go, but I
> still shudder to think of having all of those directly under ~/, so
> it's clearly doing _some_ good in that regard.

I suspect most of these files contain some state and cached
application data or content as opposed to configuration.  Try
the following from your home dir:

du -a .??*|cat -n|grep -v / |\
awk 'BEGIN{x=1;} {print $1-x, $3; x=$1;}'|sort -nr|head

This prints out top 10 of total files/dirs under each
top-level dot directory. You can try similar from .config. For
me, most in the top 10 are programs I haven't used in years!

>
> And that's to not even begin to talk about all the stuff you'll find
> in /etc on a modern Linux system.
>
> > b) a standardized plain text format
>
> I'm not sure about that; different applications have very different
> needs, and trying to shoehorn one into another would be ugly; quite
> possibly even more ugly than just having different formats.

Not shoehorn in everything but support a core set. 

> trying to write mail sorting recipies (think procmail) in a file with
> the same format as that of one holding word processor settings or an
> image metadata store.

By "one place" I meant something like a ~/etc or ~/rc or
~/config directory but not a single file. A separate config
file for each program (and library) that needs it.

Ideally I'd separate config, state, content and cache. I find
<program>/{config,state,<content>,cache} to be more modular
than {config,state,<content>,cache}/<program> -- what Apple
forces on Macs. Ex: ~/Library/Preferences/org.tug.TexWorks.plist

  parent reply	other threads:[~2019-04-29 22:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 16:54 Norman Wilson
2019-04-28 19:45 ` Jon Forrest
2019-04-28 20:00   ` Bakul Shah
2019-04-29 18:05     ` Michael Kjörling
2019-04-29 20:37       ` Warner Losh
2019-04-29 20:44       ` Christopher Browne
2019-04-30  6:44         ` Michael Kjörling
2019-04-30  7:24           ` Kurt H Maier
2019-04-30 10:35             ` Wesley Parish
2019-04-29 22:32       ` Bakul Shah [this message]
2019-04-30 11:52         ` Theodore Ts'o
2019-04-28 22:16   ` Thoma Paulsen
2019-04-29  0:53     ` John P. Linderman
  -- strict thread matches above, loose matches on Subject: below --
2019-04-27 23:03 Noel Chiappa
2019-04-27 20:11 Norman Wilson
2019-04-27 14:16 Anthony Martin
2019-04-27 15:38 ` Warner Losh
2019-04-27 15:42   ` Larry McVoy
2019-04-28 23:59   ` Warner Losh
2019-04-28 11:47 ` Dan Cross
2019-04-28 12:00   ` arnold
2019-04-28 14:44   ` jcs
2019-04-28 16:15   ` Bakul Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190429223226.303F9156E40C@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).