This might already be in the bug (or feature) tracker, i remember telling this to a dev back before this website existed. (Probably Rigo or SSolie, can't remember)
Here we go:
1) In a shell: cd env:
2) 8.Env:> echo 123456789-123456789-123456789-123456789-123456789-123456789-123456789- >test
3) Open Prefs / Workbench
4) Under Screen Title Format, add %e test
5) Click on Test
You will see that the line stops at character 59, the sixth "-" and further won't be displayed.
Why is it limited to 59 chars and not, lets stay with computer arithmetics, 64?
Can it be upped to at least 64? 128 would be even better or an option in the Prefs to enhance it where needed?
The reason is i use Tunenet and it's ability to send the song played to an env var and display those at the TitleBar (env:tunenet/playing) which works great.
If i choose to listen to Radio Stations the information given is longer as they tend to pack the album and interpret in it aswell and as such i loose this information because it gets truncated.
If this is already in the tracker or has already been mentioned (probably even by me) i apologize for the noise.
TitleBar envvar limitations
TitleBar envvar limitations
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Re: TitleBar envvar limitations
@Raziel
ENV: is now a device and not an assignment in ram: so the correct commands should be used to set and retrieve environmental variables. I just set an environmental variable with "SetEnv" that is 70 characters long and I read the same variable correctly with "GetEnv". Apparently, Tunenet is writing the variable directly to ENV: as though it were still a normal directory. That's wrong on OS4 so Tunenet needs to be fixed.
Personally, I think that storing temporary data in an environmental variable is a misuse of the environmental mechanism anyway. I think Tunenet needs a tunepup
ENV: is now a device and not an assignment in ram: so the correct commands should be used to set and retrieve environmental variables. I just set an environmental variable with "SetEnv" that is 70 characters long and I read the same variable correctly with "GetEnv". Apparently, Tunenet is writing the variable directly to ENV: as though it were still a normal directory. That's wrong on OS4 so Tunenet needs to be fixed.
Personally, I think that storing temporary data in an environmental variable is a misuse of the environmental mechanism anyway. I think Tunenet needs a tunepup
AmigaOne X1000 with 2GB memory - OS4.1 FE
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: TitleBar envvar limitations
@xenic:
I don't think that is the problem. I think the problem is that the WB only allocates a short text buffer to hold the title string.
I did write a BZ about it years ago after someone else made the same complaint, but I don't remember the outcome. I can't find any reference to it after a short look.
I don't think that is the problem. I think the problem is that the WB only allocates a short text buffer to hold the title string.
I did write a BZ about it years ago after someone else made the same complaint, but I don't remember the outcome. I can't find any reference to it after a short look.
cheers
tony
tony
Re: TitleBar envvar limitations
@Raziel
Sorry. I totally misunderstood the problem you were reporting. I should have read it twice before responding
Sorry. I totally misunderstood the problem you were reporting. I should have read it twice before responding
AmigaOne X1000 with 2GB memory - OS4.1 FE
Re: TitleBar envvar limitations
Thanks for the update Mr. wtonyw wrote:@xenic:
I don't think that is the problem. I think the problem is that the WB only allocates a short text buffer to hold the title string.
I did write a BZ about it years ago after someone else made the same complaint, but I don't remember the outcome. I can't find any reference to it after a short look.
If you stumble over the outcome or the bug item, could you please notify me?
No problem at all.xenic wrote:@xenic
@Raziel
Sorry. I totally misunderstood the problem you were reporting. I should have read it twice before responding
Thank you for taking part
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: TitleBar envvar limitations
Hi, sorry for the long wait, I've been away.
I first reported this limitation in Nov 2008 (BZ #4948). I "bumped" it in Feb 2010.
It's only an enhancement, so nothing has happened yet AFAIK.
I first reported this limitation in Nov 2008 (BZ #4948). I "bumped" it in Feb 2010.
It's only an enhancement, so nothing has happened yet AFAIK.
cheers
tony
tony
- nbache
- Beta Tester
- Posts: 1714
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: TitleBar envvar limitations
My current WB title string is 265 characters long. So I don't think the problem is the length of the buffer for the title string. But maybe a buffer specifically for the env variable's content? I only use one %e in mine, and it evaluates to 5 characters.
BTW, shouldn't the env variable name be in quotes in the title string template? It is in mine at least.
Best regards,
Niels
BTW, shouldn't the env variable name be in quotes in the title string template? It is in mine at least.
IOW, I'd have used %e "test" in your example.Raziel wrote:4) Under Screen Title Format, add %e test
Best regards,
Niels
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: TitleBar envvar limitations
Indeed, I just checked the available string length using the Workbench prefs and I was able to type in excess of 250 characters (the width of my 1440x900 screen).
There is a mention in the releasenotes of the title string allocation being changed last year, but I don't know if that is related.
So any limitation is not in that area. I'll close my old BZ.
There is a mention in the releasenotes of the title string allocation being changed last year, but I don't know if that is related.
So any limitation is not in that area. I'll close my old BZ.
cheers
tony
tony
Re: TitleBar envvar limitations
It works both, with or without "" (It doesn't matter what i choose, it displays spaces in both cases, but stops at the mentioned size)nbache wrote:My current WB title string is 265 characters long. So I don't think the problem is the length of the buffer for the title string. But maybe a buffer specifically for the env variable's content? I only use one %e in mine, and it evaluates to 5 characters.
BTW, shouldn't the env variable name be in quotes in the title string template? It is in mine at least.IOW, I'd have used %e "test" in your example.Raziel wrote:4) Under Screen Title Format, add %e test
Best regards,
Niels
The only time i have to use "" is when i want to show a variable in brackets, like so Weather: Clear Skies (16°C) where the corresponding line in Workbench prefs would be Weather: %e weather/weather (%e "weather/temp") otherwise, for some reason, it won't work (i.e. i get a single ( instead of the data)
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
- salass00
- AmigaOS Core Developer
- Posts: 530
- Joined: Sat Jun 18, 2011 3:12 pm
- Location: Finland
- Contact:
Re: TitleBar envvar limitations
I would assume it doesn't work without quotes there because you don't have en env-var called "weather/temp)".Raziel wrote: The only time i have to use "" is when i want to show a variable in brackets, like so Weather: Clear Skies (16°C) where the corresponding line in Workbench prefs would be Weather: %e weather/weather (%e "weather/temp") otherwise, for some reason, it won't work (i.e. i get a single ( instead of the data)