Hi everyone,
I am making my own rainmeter skins. Most of them are icons for applications. I make the .ini files for them in command line of powershell under Win10. To initial the skin, I alwalys need to double-click the ini file in the Rainmeter panel. As the application number increasing, it becomes harder for me to select the new ini file in the skinpath. Could you tell me a way to initial loading the skin in command line ? Like bangs? I know I could change the "Active" value in the "rainmeter.ini" file. But that only successes after I have loaded the skin by mouse click previously.
Thank you for your time.
Bests.
Zhang Wei
It is currently March 29th, 2024, 3:25 pm
How to use command line to initial skins in the ini files?
-
- Posts: 4
- Joined: April 23rd, 2019, 7:04 am
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to use command line to initial skins in the ini files?
After creating a new skin outside of Rainmeter, you need to "!Refresh All" or "!RefreshApp" in order for Rainmeter to "see" the new skin. Note that Bangs can also be used from the Windows command line as a parameter to the Rainmeter.exe executable.brainwatcher wrote: ↑April 23rd, 2019, 7:19 am Hi everyone,
I am making my own rainmeter skins. Most of them are icons for applications. I make the .ini files for them in command line of powershell under Win10. To initial the skin, I alwalys need to double-click the ini file in the Rainmeter panel. As the application number increasing, it becomes harder for me to select the new ini file in the skinpath. Could you tell me a way to initial loading the skin in command line ? Like bangs? I know I could change the "Active" value in the "rainmeter.ini" file. But that only successes after I have loaded the skin by mouse click previously.
Thank you for your time.
Bests.
Zhang Wei
Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !RefreshApp
Then you can use the !ActivateConfig Bang to load the new skin; you will need the "Config" name and the "file" name for use in that bang.
Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "illustro\Clock" "Clock.ini"
Or from another Rainmeter skin using just the Bang.
Example: !ActivateConfig "illustro\Clock" "Clock.ini"
That should enable you to add the new skin to Rainmeter and activate it, either from your Windows command line window or inside a Rainmeter skin using Bangs.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to use command line to initial skins in the ini files?
Yes, but problem is that when you want to load a not loaded skin through this method, you get a message that Rainmeter.ini is read-only. Unfortunately I don't see a way to use this method to load / unload skins (o I am just missing something?), because I suppose while Rainmeter is running, it has control over Rainmeter.ini, where the status of skins are written. You can't modify it "from outside", through a command line.eclectic-tech wrote: ↑April 23rd, 2019, 2:02 pm That should enable you to add the new skin to Rainmeter and activate it, either from your Windows command line window
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to use command line to initial skins in the ini files?
Aargh! You are right.balala wrote: ↑April 23rd, 2019, 2:44 pm Yes, but problem is that when you want to load a not loaded skin through this method, you get a message that Rainmeter.ini is read-only. Unfortunately I don't see a way to use this method to load / unload skins (o I am just missing something?), because I suppose while Rainmeter is running, it has control over Rainmeter.ini, where the status of skins are written. You can't modify it "from outside", through a command line.
Once a new skin is added using "!RefreshApp", it cannot be activated from the command line while Rainmeter is running.
Exit Rainmeter, write the new config as active in rainmeter.ini, restart Rainmeter... so we are "back to square one".
I too don't see a simple way to achieve the OP's desire to activate the newly created skin using bangs.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to use command line to initial skins in the ini files?
Activating it using a bang is easy (!ActivateConfig bang). What is hard (and I don't have good tip) is how to activate a skin / config from command line (I suppose this is what you wanted to say, right?).eclectic-tech wrote: ↑April 23rd, 2019, 4:00 pm I too don't see a simple way to achieve the OP's desire to activate the newly created skin using bangs.
-
- Posts: 4
- Joined: April 23rd, 2019, 7:04 am
Re: How to use command line to initial skins in the ini files?
Thank you for your advice! Really helpful! It works well in my powershell script.( $add_name is the new skin name.)eclectic-tech wrote: ↑April 23rd, 2019, 2:02 pm After creating a new skin outside of Rainmeter, you need to "!Refresh All" or "!RefreshApp" in order for Rainmeter to "see" the new skin. Note that Bangs can also be used from the Windows command line as a parameter to the Rainmeter.exe executable.
Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !RefreshApp
Then you can use the !ActivateConfig Bang to load the new skin; you will need the "Config" name and the "file" name for use in that bang.
Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "illustro\Clock" "Clock.ini"
Or from another Rainmeter skin using just the Bang.
Example: !ActivateConfig "illustro\Clock" "Clock.ini"
That should enable you to add the new skin to Rainmeter and activate it, either from your Windows command line window or inside a Rainmeter skin using Bangs.
Code: Select all
$x1="!ActivateConfig"
$x2='"'+"illustro\icon\$add_name"+'"'
$x3='"'+"$add_name.ini"+'"'
Start-Process -FilePath "C:\Users\username\Documents\Rainmeter\Skins\Rainmeter.exe" -ArgumentList $x1,$x2,$x3
-
- Posts: 4
- Joined: April 23rd, 2019, 7:04 am
Re: How to use command line to initial skins in the ini files?
I don't know the reason for your mentioned problem. I am using powershell. I found no error editing my rainmeter.ini.eclectic-tech wrote: ↑April 23rd, 2019, 4:00 pm Aargh! You are right.
Once a new skin is added using "!RefreshApp", it cannot be activated from the command line while Rainmeter is running.
Exit Rainmeter, write the new config as active in rainmeter.ini, restart Rainmeter... so we are "back to square one".
I too don't see a simple way to achieve the OP's desire to activate the newly created skin using bangs.
-
- Posts: 4
- Joined: April 23rd, 2019, 7:04 am
Re: How to use command line to initial skins in the ini files?
I don't know the reason for your mentioned problem. I am using powershell win10-64bit. I found no error editing my rainmeter.ini.balala wrote: ↑April 23rd, 2019, 2:44 pm Yes, but problem is that when you want to load a not loaded skin through this method, you get a message that Rainmeter.ini is read-only. Unfortunately I don't see a way to use this method to load / unload skins (o I am just missing something?), because I suppose while Rainmeter is running, it has control over Rainmeter.ini, where the status of skins are written. You can't modify it "from outside", through a command line.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to use command line to initial skins in the ini files?
Yeah, I didn't test the PowerShell solution, just the plain command line one, which didn't work. If the PowerShell works, use it.brainwatcher wrote: ↑April 23rd, 2019, 4:26 pm I don't know the reason for your mentioned problem. I am using powershell win10-64bit. I found no error editing my rainmeter.ini.
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to use command line to initial skins in the ini files?
I commented after trying it in Windows command line (per balala's comment) and having it fail to work.brainwatcher wrote: ↑April 23rd, 2019, 4:23 pm I don't know the reason for your mentioned problem. I am using powershell. I found no error editing my rainmeter.ini.
Good to know it worked in a PowerShell script.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::