Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

If you're not part of the solution, you're part of the precipitate.


devel / comp.lang.tcl / Announcing: What's Your Type version 0.1 (beta).

SubjectAuthor
* Announcing: What's Your Type version 0.1 (beta).Luc
`* Re: Announcing: What's Your Type version 0.1 (beta).Rolf Ade
 `* Re: Announcing: What's Your Type version 0.1 (beta).saitology9
  `* Re: Announcing: What's Your Type version 0.1 (beta).Luc
   +* Re: Announcing: What's Your Type version 0.1 (beta).saitology9
   |+- Re: Announcing: What's Your Type version 0.1 (beta).saitology9
   |`* Re: Announcing: What's Your Type version 0.1 (beta).Luc
   | `- Re: Announcing: What's Your Type version 0.1 (beta).saitology9
   +- Re: Announcing: What's Your Type version 0.1 (beta).Rich
   `- Re: Announcing: What's Your Type version 0.1 (beta).Lawrence Woodman

1
Announcing: What's Your Type version 0.1 (beta).

<20240309212214.18a2ae85@lud1.home>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13512&group=comp.lang.tcl#13512

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Announcing: What's Your Type version 0.1 (beta).
Date: Sat, 9 Mar 2024 21:22:14 -0300
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <20240309212214.18a2ae85@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="ffd133ba404f2f80050a18db87eae04f";
logging-data="2730113"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Zb55V+Zz8mD637KkKzyy/yqNbSNg9f/4="
Cancel-Lock: sha1:ntKWgv0P9S7zE07MZSDEl0f5OL8=
 by: Luc - Sun, 10 Mar 2024 00:22 UTC

Yeah, well, I only began this thing because I thought it would be 100,
maybe 150 lines of code. And it ballooned to more than 1,600.

OK, it was good. It's not very polished, it's poorly tested and a few
things can be considered unfinished, but it's pretty usable. I will
improve it later.

What's Your Type, version 0.1, beta.
https://sourceforge.net/projects/whatsyourtype/

Linux only. Windows coming soon.

What's Your Type is a program with a GUI that lets you browse all the
fonts you have installed in your operating system and pick/isolate a
few you may want to use in some project. It is specifically designed
for people who are working on some graphical design project that
requires fancy fonts such as Web sites, fliers, newsletters etc.
and need to browse and choose fonts.

package require Tk
package require tile
package require Thread
package require BWidget

All comments are welcome.

Big "Thank you" to all who helped.

--
Luc
>>

Re: Announcing: What's Your Type version 0.1 (beta).

<87zfv60x1c.fsf@pointsman.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13514&group=comp.lang.tcl#13514

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rolf@pointsman.de (Rolf Ade)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 19:19:43 +0100
Organization: Me
Lines: 48
Message-ID: <87zfv60x1c.fsf@pointsman.de>
References: <20240309212214.18a2ae85@lud1.home>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net rJts6lUC+cYmXL40gTpulwl/ajQ9xep41+/zUB//MPRyoctOE=
Cancel-Lock: sha1:HWQLEzsEowX8GLytFcimMy4JRpQ= sha1:kJwWZDOcbMcSui21lSfT68UN8I8= sha256:YrzlOrngsYgsQISvwjrejS6GU1d8PeDZdvah8DYoQt4=
User-Agent: Gnus/5.13 (Gnus v5.13)
 by: Rolf Ade - Sun, 10 Mar 2024 18:19 UTC

Luc <luc@sep.invalid> writes:
> Yeah, well, I only began this thing because I thought it would be 100,
> maybe 150 lines of code. And it ballooned to more than 1,600.
>
> OK, it was good. It's not very polished, it's poorly tested and a few
> things can be considered unfinished, but it's pretty usable. I will
> improve it later.
>
>
> What's Your Type, version 0.1, beta.
> https://sourceforge.net/projects/whatsyourtype/
>
> Linux only. Windows coming soon.

Thanks for sharing. I gave your script a try and it raised error at
startup:

Error in startup script: no such variable
(read trace on "env(XDG_CONFIG_HOME)")
invoked from within
"set ::homedir $env(XDG_CONFIG_HOME)"

I don't have XDG_CONFIG_HOME set in my enviroment because I just use the
default (~/.config). This is just fine, according to the XDG Base
Directory Specification[1]:

"$XDG_CONFIG_HOME defines the base directory relative to which
user-specific configuration files should be stored. If $XDG_CONFIG_HOME
is either not set or empty, a default equal to $HOME/.config should be
used."

I altered your script like:

if {[info exists env(XDG_CONFIG_HOME)]} {
set ::homedir $env(XDG_CONFIG_HOME)
} else {
# Try to be future ready: no tilde expansion
# anymore in Tcl 9
set ::homedir $env(HOME)/.config
}

and then it runs fine for me.

rolf

[1] https://specifications.freedesktop.org/basedir-spec/latest/

Re: Announcing: What's Your Type version 0.1 (beta).

<usl8ll$35vvh$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13515&group=comp.lang.tcl#13515

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 17:28:21 -0400
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <usl8ll$35vvh$1@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 10 Mar 2024 21:28:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c68bccc1591ba88b218911d7cb8326c3";
logging-data="3342321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XeQC9YnhyxK13p1+DzFDS"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+5bcJxshHLTcUSQfKzo6Wvwf298=
In-Reply-To: <87zfv60x1c.fsf@pointsman.de>
Content-Language: en-US
 by: saitology9 - Sun, 10 Mar 2024 21:28 UTC

On 3/10/2024 2:19 PM, Rolf Ade wrote:
>
> Luc <luc@sep.invalid> writes:
>> Yeah, well, I only began this thing because I thought it would be 100,
>> maybe 150 lines of code. And it ballooned to more than 1,600.
>>
>> OK, it was good. It's not very polished, it's poorly tested and a few
>> things can be considered unfinished, but it's pretty usable. I will
>> improve it later.
>>
>>
>> What's Your Type, version 0.1, beta.
>> https://sourceforge.net/projects/whatsyourtype/
>>
>> Linux only. Windows coming soon.
>

>
> I altered your script like:
>
> if {[info exists env(XDG_CONFIG_HOME)]} {
> set ::homedir $env(XDG_CONFIG_HOME)
> } else {
> # Try to be future ready: no tilde expansion
> # anymore in Tcl 9
> set ::homedir $env(HOME)/.config
> }
>

Thanks for sharing.

You can get it to run on Windows too. Changes for Windows are:

1) Remove or comment out the entire block of code above and just say this:

set ::homedir [pwd]

2) there are a few places that use commands similar to "wm attributes
$::b1 -zoomed 0". This usage is Linux specific and will throw an error.
You can just comment these out altogether and then just resize the
windows yourself.

3) Some bindings are not defined. But you will get the app up and running.

However, I am not sure what I am looking at. Typing c will let you
change some settings. It is very hard to scroll - maybe it is not meant
to be scrolled. It displays the fonts on your system with a sample text
to see what they look like.

Re: Announcing: What's Your Type version 0.1 (beta).

<20240310192151.2676d766@lud1.home>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13516&group=comp.lang.tcl#13516

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 19:21:51 -0300
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <20240310192151.2676d766@lud1.home>
References: <20240309212214.18a2ae85@lud1.home>
<87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="ffd133ba404f2f80050a18db87eae04f";
logging-data="3358827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fOSfFJTJoY20qPb4VF0ObYSgLKigkNfk="
Cancel-Lock: sha1:JyyeiHwwS2Itl53XWENyJWPpKWY=
 by: Luc - Sun, 10 Mar 2024 22:21 UTC

On Sun, 10 Mar 2024 19:19:43 +0100, Rolf Ade wrote:

>I don't have XDG_CONFIG_HOME set in my enviroment because I just use the
>default (~/.config). This is just fine, according to the XDG Base
>Directory Specification[1]:

I had no idea. I trusted that variable to be universal. Will be fixed in the
next version. Thank you.

On Sun, 10 Mar 2024 17:28:21 -0400, saitology9 wrote:

>You can get it to run on Windows too. Changes for Windows are:
>1) Remove or comment out the entire block of code above and just say this:
>set ::homedir [pwd]
>2) there are a few places that use commands similar to "wm attributes
>$::b1 -zoomed 0". This usage is Linux specific and will throw an error.

Those are things that I will find out when I get it running on Windows. I
only have XP and I don't have Tcl/Tk installed on Windows. I tried it with a
cross-compiled Freewrap binary, but I am having problems with BWidget:

https://sourceforge.net/p/freewrap/bugs/62/

It seems I am not the only one:

https://sourceforge.net/p/freewrap/bugs/50/

But the proposed fix doesn't work for me.

I suspect LaBelle will close my ticket as wont-fix but first I want to
see if he has anything to say.

Please remember that very few people even know what Tcl/Tk is so I
really need to distribute binary versions.

>However, I am not sure what I am looking at. Typing c will let you
>change some settings. It is very hard to scroll - maybe it is not meant
>to be scrolled. It displays the fonts on your system with a sample text
>to see what they look like.

The description of the program is quite clear on its SourceForge page.
There is also a manual. Did you press F1? You should have been informed
of the F1 binding on the first run.

Please elaborate on "very hard to scroll." It should scroll smoothly. Are
you on Windows?

--
Luc
>>

Re: Announcing: What's Your Type version 0.1 (beta).

<usld2t$36q88$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13517&group=comp.lang.tcl#13517

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 18:43:41 -0400
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <usld2t$36q88$1@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me> <20240310192151.2676d766@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 10 Mar 2024 22:43:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a14c5dd1da212338a0a43afd90f75577";
logging-data="3369224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OhLQYJwwgLbU+UEiOoeaA"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:35lxyA4bIhcom5v7PvAq/ve0/D4=
In-Reply-To: <20240310192151.2676d766@lud1.home>
Content-Language: en-US
 by: saitology9 - Sun, 10 Mar 2024 22:43 UTC

On 3/10/2024 6:21 PM, Luc wrote:
>
> Please remember that very few people even know what Tcl/Tk is so I
> really need to distribute binary versions.
>

Sure - absolutely. I'd say, in general, users don't want an app to start
in full screen mode; so perhaps just removing those lines would be fine.

>
> The description of the program is quite clear on its SourceForge page.
> There is also a manual. Did you press F1? You should have been informed
> of the F1 binding on the first run.

I think it said press c or something. I may be wrong though.

>
> Please elaborate on "very hard to scroll." It should scroll smoothly. Are
> you on Windows?
>

You can't use the mousewheel scroll. It doesn't do anything. I can
click or select anything. I can grab the scrollbar and then it works
but it is a bit different? When I do Control-A, in full selection mode,
you see the outlines if widgets and stuff.

I guess my confusion was around the precise widget positioning stuff
that was discussed in the threads. You can completely ignore my comment.

Re: Announcing: What's Your Type version 0.1 (beta).

<usldjo$36q88$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13518&group=comp.lang.tcl#13518

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 18:52:39 -0400
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <usldjo$36q88$2@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me> <20240310192151.2676d766@lud1.home>
<usld2t$36q88$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 10 Mar 2024 22:52:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a14c5dd1da212338a0a43afd90f75577";
logging-data="3369224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EMONm89MoP7z0seLGXEf0"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ogz4BNU8b+E9UpbjMgVH+94R3Go=
In-Reply-To: <usld2t$36q88$1@dont-email.me>
Content-Language: en-US
 by: saitology9 - Sun, 10 Mar 2024 22:52 UTC

> You can't use the mousewheel scroll.  It doesn't do anything.  I can

This should read: "I cannot select anything...". I realize it may be a
Windows thing.

Nice app though.

Re: Announcing: What's Your Type version 0.1 (beta).

<20240310195313.4fabc0c7@lud1.home>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13519&group=comp.lang.tcl#13519

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 19:53:13 -0300
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <20240310195313.4fabc0c7@lud1.home>
References: <20240309212214.18a2ae85@lud1.home>
<87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me>
<20240310192151.2676d766@lud1.home>
<usld2t$36q88$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="ffd133ba404f2f80050a18db87eae04f";
logging-data="3366208"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XU5As4mF12+ASS5a9QUiJ7XLWveHSjk0="
Cancel-Lock: sha1:gWOwbkLZHqMXhpw8qa2YrKpCIRQ=
 by: Luc - Sun, 10 Mar 2024 22:53 UTC

On Sun, 10 Mar 2024 18:43:41 -0400, saitology9 wrote:

>You can't use the mousewheel scroll. It doesn't do anything. I can
>click or select anything. I can grab the scrollbar and then it works
>but it is a bit different? When I do Control-A, in full selection mode,
>you see the outlines if widgets and stuff.
>
>I guess my confusion was around the precise widget positioning stuff
>that was discussed in the threads. You can completely ignore my comment.
>
**************************

The mousewheel scroll works fine for me on Linux. The selection doesn't
go along though. So yes, it's awkward. I will have to fix that.

Control-A doesn't work at all for me. Does it for you? I can select all
by double-clicking the background. But that should not happen. Will fix
it too.

Windows is not supported for the time being. As soon as I get a chance
to actually run it on Windows I should iron out those and other
problems.

Thank you for the feedback.

--
Luc
>>

Re: Announcing: What's Your Type version 0.1 (beta).

<usle1o$37365$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13520&group=comp.lang.tcl#13520

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 23:00:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <usle1o$37365$1@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de> <usl8ll$35vvh$1@dont-email.me> <20240310192151.2676d766@lud1.home>
Injection-Date: Sun, 10 Mar 2024 23:00:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="00eae54c4aad691a4d34ea0cb458af31";
logging-data="3378373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UCEarN+cE0Qf3PfjQSWpe"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:LTprbBS+ABOobi5JSOv7kdfDOXw=
 by: Rich - Sun, 10 Mar 2024 23:00 UTC

Luc <luc@sep.invalid> wrote:
> On Sun, 10 Mar 2024 19:19:43 +0100, Rolf Ade wrote:
>
>>I don't have XDG_CONFIG_HOME set in my enviroment because I just use the
>>default (~/.config). This is just fine, according to the XDG Base
>>Directory Specification[1]:
>
> I had no idea. I trusted that variable to be universal. Will be fixed in the
> next version. Thank you.

XDG_* is all Linux/Unix specific stuff, windows has its own, different,
vaariant.

Re: Announcing: What's Your Type version 0.1 (beta).

<usle8o$36q88$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13521&group=comp.lang.tcl#13521

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Sun, 10 Mar 2024 19:03:52 -0400
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <usle8o$36q88$3@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me> <20240310192151.2676d766@lud1.home>
<usld2t$36q88$1@dont-email.me> <20240310195313.4fabc0c7@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 10 Mar 2024 23:03:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dce78bce901f991e764014638c444209";
logging-data="3369224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Apkz2gZ9vhgV1dFqG+dMZ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rtj4vf8kK8JWf1f/ewVUsh3CqA0=
In-Reply-To: <20240310195313.4fabc0c7@lud1.home>
Content-Language: en-US
 by: saitology9 - Sun, 10 Mar 2024 23:03 UTC

On 3/10/2024 6:53 PM, Luc wrote:
> On Sun, 10 Mar 2024 18:43:41 -0400, saitology9 wrote:
>
>
> The mousewheel scroll works fine for me on Linux. The selection doesn't
> go along though. So yes, it's awkward. I will have to fix that.
>

OK - it depends on where your mouse is. If you pointer is in the empty
space near the scrollbars, then it seems to be OK. In the middle, it
goes a bit and then stops. Towards the left where font stuff is
displayed, none at all.

> Control-A doesn't work at all for me. Does it for you? I can select all
> by double-clicking the background. But that should not happen. Will fix
> it too.
>

Yes, it does. I tried double click and it works the same way as COtnrol-A.

Re: Announcing: What's Your Type version 0.1 (beta).

<usmd3f$3fsbp$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=13522&group=comp.lang.tcl#13522

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lorrywoodman@gmail.com (Lawrence Woodman)
Newsgroups: comp.lang.tcl
Subject: Re: Announcing: What's Your Type version 0.1 (beta).
Date: Mon, 11 Mar 2024 07:50:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 86
Message-ID: <usmd3f$3fsbp$1@dont-email.me>
References: <20240309212214.18a2ae85@lud1.home> <87zfv60x1c.fsf@pointsman.de>
<usl8ll$35vvh$1@dont-email.me> <20240310192151.2676d766@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 07:50:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="17b3462116bfedffe5559056a696d933";
logging-data="3666297"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hrGj81KWEyYQtuM7JCRs0bjIlfidaPlc="
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:06Y8FCIkLIpPatHnr3WRpvDf2ds=
 by: Lawrence Woodman - Mon, 11 Mar 2024 07:50 UTC

On Sun, 10 Mar 2024 19:21:51 -0300, Luc wrote:

> On Sun, 10 Mar 2024 19:19:43 +0100, Rolf Ade wrote:
>
>>I don't have XDG_CONFIG_HOME set in my enviroment because I just use the
>>default (~/.config). This is just fine, according to the XDG Base
>>Directory Specification[1]:
>
> I had no idea. I trusted that variable to be universal. Will be fixed in
> the next version. Thank you.

I have written two modules that you might find useful to handle this
situation. Both have sensible defaults. Here's some details in case
you're interested.

xdgbasedir
----------
This is ia TCL module to handle the XDG Base Directory Specification
https://github.com/lawrencewoodman/xdgbasedir_tcl

To access the XDG directories you would typically specify the subdirectory
that these directories will be relative to. The subdirectory is normally
the name of the application:

package require xdgbasedir

puts "XDG_DATA_HOME: [XDG::DATA_HOME myapp]"
puts "XDG_CACHE_HOME: [XDG::CACHE_HOME myapp]"
puts "XDG_CONFIG_HOME: [XDG::CONFIG_HOME myapp]"

puts "XDG_RUNTIME_DIR: [XDG::RUNTIME_DIR myapp]"
puts "XDG_DATA_DIRS: [XDG::DATA_DIRS myapp]"
puts "XDG_CONFIG_DIRS: [XDG::CONFIG_DIRS myapp]"

The XDG procs ending in _DIRS return a list of directories in order of
preference.

AppDirs
-------
A Tcl module to simplify cross-platform application file locations
https://github.com/lawrencewoodman/appdirs_tcl

An application that is installed on a variety of platforms will use
different locations on each platform to access files. This module aims to
provide access to these locations through a common interface. For each
operating system the module aims to use an appropriate standard for the
locations, for example on Linux the XDG Base Directory Specification is
used and on Microsoft Windows or Darwin/Mac OS X the most common locations
for each version of the operating system is used.

First create an instance of the AppDirs class by instantiating it with
a brand and applicationName. The brand may be ignored depending on the
platform that is being used. You can then call the methods on this
instance as follows:

package require AppDirs

set myAppDirs [AppDirs new myBrand myApp]

# Return location of user-specific data files
puts "data home: [$myAppDirs dataHome]"

# Return location of user-specific configuration files
puts "config home: [$myAppDirs configHome]"

# Return a list of locations for system-wide configuration files in
# preference order
puts "data dirs: [$myAppDirs dataDirs]"

# Return a list of locations for system-wide data files in
# preference order
puts "config dirs: [$myAppDirs configDirs]"

Best wishes

Lorry

---
XCCP: A Shell Extension for CP/M
https://techtinkering.com/articles/xccp-a-shell-extension-for-cpm/

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor