It is currently March 28th, 2024, 8:40 pm
Any sort of Region function in the .ini files?
-
- Posts: 14
- Joined: June 28th, 2013, 1:53 pm
Any sort of Region function in the .ini files?
So I'm curious if there's any way to group a set of items together in the .ini skin files. In C# you can just say #region Region Name and it will allow you to collapse all the items inside the region until you give it #endregion. So for example I have a skin that uses a ton of measures for gathering CPU usages, temps and other data. Is there a way to get all the measures for CPU to collapse down so I can have a cleaner feel when editing/creating my skins. I use Notepad++ for editing so it does allow me to collapse each individual measure and meter, but I haven't found a way to collapse a large section.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Any sort of Region function in the .ini files?
No. The .ini file format is pretty simple and straightforward. It's really not designed or intended as a full-featured programming language format. It's original intent was as a "settings" file, to be read by some application as a way to define options. If we had a wayback machine, and could do it all over, that would not be the file format that would have ever been chosen for Rainmeter.vandey wrote: ↑August 11th, 2020, 1:19 pm So I'm curious if there's any way to group a set of items together in the .ini skin files. In C# you can just say #region Region Name and it will allow you to collapse all the items inside the region until you give it #endregion. So for example I have a skin that uses a ton of measures for gathering CPU usages, temps and other data. Is there a way to get all the measures for CPU to collapse down so I can have a cleaner feel when editing/creating my skins. I use Notepad++ for editing so it does allow me to collapse each individual measure and meter, but I haven't found a way to collapse a large section.
-
- Posts: 14
- Joined: June 28th, 2013, 1:53 pm
Re: Any sort of Region function in the .ini files?
Alright, thanks I was hopeful for some sort of way to do this as my skin files contain a ton of data, it'd be easier to maintain separately or if there was a way to group sections together. In any case, thanks!
-
- Posts: 14
- Joined: June 28th, 2013, 1:53 pm
Re: Any sort of Region function in the .ini files?
Suppose there's no way to have measures in one "skin" file and have another "skin" file to reference that?
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Any sort of Region function in the .ini files?
Sure, that's easy.
@Include=#CURRENTPATH#myMeasures.inc
https://docs.rainmeter.net/manual/skins/include-option/
https://docs.rainmeter.net/tips/include-guide/
Just put that @Include .inc file wherever you want the measures to functionally be in your skin .ini file.
-
- Posts: 14
- Joined: June 28th, 2013, 1:53 pm
Re: Any sort of Region function in the .ini files?
Thanks that will actually help a ton! Just being able to move the measures to a different file will help, as I'll be able to split the different sections of measures up into different files.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Any sort of Region function in the .ini files?
Glad to help. At its most extreme, you could do this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
@IncludeMyVariables=#CURRENTPATH#myVariables.inc
@IncludeMySystemMeasures=#CURRENTPATH#mySystemMeasures.inc
@IncludeMyNetworkMeasures=#CURRENTPATH#myNetworkMeasures.inc
@IncludeMyClockMeasures=#CURRENTPATH#myClockMeasures.inc
@IncludeMySystemMeters=#CURRENTPATH#mySystemMeters.inc
@IncludeMyNetworkMeters=#CURRENTPATH#myNetworkMeters.inc
@IncludeMyClockMeters=#CURRENTPATH#myClockMeters.inc
-
- Posts: 14
- Joined: June 28th, 2013, 1:53 pm
Re: Any sort of Region function in the .ini files?
Yeah I see I can write each one individually then including the meters as well in those .inc files... I might attempt to do that instead so each section is independent. We'll see, I'm not sure I want to get too carried away with it, but it will definitely help clean up the file a bit.