It is currently December 5th, 2023, 12:13 pm

New Tiered Variable System

Report bugs with the Rainmeter application and suggest features.
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

New Tiered Variable System

Post by dragonmage »

I propose a Variables system which should save us all a bit of time and make the end user experience a little better.

Step 1

At the root will be a Variables.ini next to Rainmeter.ini. The Variables in this file will be considered "global", meaning any skin author can use the variables that we have defined here in their skins. This would be used for things like #AccuweatherLocation# so the user only has to enter the location once in Variables.ini and it is available to all skins that use #AccuweatherLocation#.

I would also suggest moving ConfigEditor to this file rather than Rainmeter.ini. As it is now when we distribute themes, the users will have to manually change their ConfigEditor= on each .thm. Moving the Skinpath= there might also be a good idea. (Why isn't it SKINSPATH in Rainmeter.ini like the variable name?)

Example ini

Code: Select all

[Variables]
Skinpath="C:\Program Files\Rainmeter\Skins\"
ConfigEditor="C:\Program Files\Notepad++\Notepad++.exe"
AccuweatherLocation=28212
There may of course be more, (any suggestions?) but I feel these should be predetermined so that they will be common to all users.

Step 2

We'll call this "External Skin Variables" for lack of a better term. This would be at the skin author's discretion. Any skin folder containing a Variables.ini would apply those variables to all skins in that folder and any subfolders. I'll use Enigma as a quick example. If Enigma\Variables.ini exists...

Code: Select all

[Variables]
FontColor1=255,255,255,200
FontColor2=255,255,255,150
All skins in Enigma using #FontColor1# could have their color changed by changing the one entry in Enigma\Variables.ini

Step 3

Skin level variables in individual skins would still be in place, and would also include any applicable variables from the "external" Variables.ini. This is to insure that moving or copying a skin from it's root folder does not render it useless as it will be looking for nonexistent variables, if they aren't included.

If a user wanted to change the FontColor1 of only one skin they would have to change the variable name in that particlar ini.

I think that about sums it up. Any ideas or suggestions or glaring holes in the logic that I missed?
User avatar
jsmorley
Developer
Posts: 22593
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Tiered Variable System

Post by jsmorley »

I think it's a good idea. I can't really think of a lot of variables (weather code, gmail id and password come to mind, but not a lot of others) that I would ever consider "global" from a skin makers perspective, but I'm sure there are in fact others and nothing about this proposal forces me to use it if I don't want to.

I can see it being a lot more useful for a "suite" maker, who might indeed want to set FontFace= in it so he can switch to something else with one line that changes 100 skins, but probably not as useful for someone like me who uses an eclectic mixture of homebrew skins, things from DevArt and things stolen shamelessly from Kaelri
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: New Tiered Variable System

Post by dragonmage »

Here's a "global" idea you might find useful...

Code: Select all

[Variables]
Browser=
ImageEditor=
InstantMessenger=
User avatar
jsmorley
Developer
Posts: 22593
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Tiered Variable System

Post by jsmorley »

dragonmage wrote:Here's a "global" idea you might find useful...

Code: Select all

[Variables]
Browser=
ImageEditor=
InstantMessenger=
But all of those are already global in a sense, as they have file associations. So if I click on a link, I don't need Rainmeter to know that my browser is Firefox. If I "execute" an image, Photoshop already automatically loads. I dnt do inst msg yo

;-)
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: New Tiered Variable System

Post by maminscris »

Fontface=
Fontsize=
StringStyle=
Antialias=
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
jsmorley
Developer
Posts: 22593
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Tiered Variable System

Post by jsmorley »

maminscris wrote:Fontface=
Fontsize=
StringStyle=
Antialias=
See, that is my point. Those are in no way "global". When would I ever want every single skin and meter in all of Rainmeter to have the same FontSize? It is ONLY of value to a "suite" maker. I might want a single .ini file to have common settings for those things, but that is already in the works with the new "MeterStyle" function we are adding. It is a pointless "nice to have" to add code to make those kinds of things "global".
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: New Tiered Variable System

Post by maminscris »

global might be skin folder and other .exe taken as "plugins" as standalonestak, or open menu, but the skin variables like font (with all his suit) will never be, i remember i was download a skin thet it was using digital font, that i was not installed, and rainmeter has show a black font i think it was tahoma at 11 or 12 size, this might be nice to add, when the person that have not install the skin font rainmeter to have his default, of course it will be useless, since you will implemet local font
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
kenz0
Developer
Posts: 263
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: New Tiered Variable System

Post by kenz0 »

The function which uses a variable in common between separate skins(.RC) is already implemented with Rainmeter on LiteStep. "evars.rc" which keeps the variable of the whole theme is similar to this issue. If we implement a similar function in stand-alone Rainmeter, I think that we need that we are careful to competition with LS side. so I guess that the approach of applying the specification by which module version Rainmeter implementing has already been carried out also like the stand-alone version Rainmeter is comparatively easy, and safety.
.
Image
SillyBlade
Posts: 8
Joined: August 12th, 2009, 12:41 am

Re: New Tiered Variable System

Post by SillyBlade »

jsmorley wrote: See, that is my point. Those are in no way "global". When would I ever want every single skin and meter in all of Rainmeter to have the same FontSize? It is ONLY of value to a "suite" maker. I might want a single .ini file to have common settings for those things, but that is already in the works with the new "MeterStyle" function we are adding. It is a pointless "nice to have" to add code to make those kinds of things "global".
So you can't find a way for it to be useful for you... But plenty of others seem to like the idea.

So, how about just not worry about it? It's not going to hurt you any. So it's not like you have to sit here and stress over it.

Imo, it would be rather usefull. Especially since you can set the variables to be whatever you want.

Have 2 font sizes?

FontSize
FontSize2

Or make them shorter and go with #FS# and FS2# and maybe a third for #FS3#

That way if you ever wanted to adjust a complete skin you won't have to scroll all the way through it. You could just go to the variables ini and adjust just the certain ones you want.
User avatar
jsmorley
Developer
Posts: 22593
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Tiered Variable System

Post by jsmorley »

SillyBlade wrote: So you can't find a way for it to be useful for you... But plenty of others seem to like the idea.

So, how about just not worry about it? It's not going to hurt you any. So it's not like you have to sit here and stress over it.

Imo, it would be rather usefull. Especially since you can set the variables to be whatever you want.

Have 2 font sizes?

FontSize
FontSize2

Or make them shorter and go with #FS# and FS2# and maybe a third for #FS3#

That way if you ever wanted to adjust a complete skin you won't have to scroll all the way through it. You could just go to the variables ini and adjust just the certain ones you want.
You know, I say what I think, but with the best of intentions and never making it personal. If you want to make personal attacks you really need to find a different forum. It is not how we work here. Be very careful how you construct your next reply.