For anyone that wants a save layout function in their skin, I made one in Sonder:
https://www.deviantart.com/michaelpurses/art/Sonder-Rainmeter-skin-838147223
Screenshot 2020-10-31 183107.png
I save the layout, wallpaper, and current custom variables. But it's pretty simple code for creating/deleting the folder and copying the current layout settings file.
Code: Select all
;Layouts
[MeasureRunCopyLayoutFolder]
Measure=Plugin
Plugin=RunCommand
Parameter=mkdir "#SETTINGSPATH#Layouts\#Name#"
DynamicVariables=1
[MeasureRunRemoveLayoutFolder]
Measure=Plugin
Plugin=RunCommand
Parameter=rmdir "#SETTINGSPATH#Layouts\#Name#"
DynamicVariables=1
[MeasureRunCopyLayoutFile]
Measure=Plugin
Plugin=RunCommand
Parameter=copy "#RainmeterLayoutFile#" "#SETTINGSPATH#Layouts\#Name#\Rainmeter.ini"
DynamicVariables=1
Call it via a text box that has the name you want to call it:
Code: Select all
Command1=[!SetVariable Name "$UserInput$"][!CommandMeasure MeasureRunCopyLayoutFolder Run][!Delay 500][!CommandMeasure MeasureRunCopyLayoutFile Run]
I use this type of code to save/apply wallpapers as well, but don't save them in the Layout folder because Rainmeter doesn't save the fit. So I apply them separately from the LoadLayout call.
Code: Select all
;Get Wallpaper data from registry:
[WallpaperPath]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=WallPaper
[WallpaperFit]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=WallpaperStyle
[WallpaperTile]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=TileWallpaper
Converting the registry number to the fit (lua):
Code: Select all
if wallfitnum == '10' then
wallfit = 'Fill'
elseif wallfitnum == '6' then
wallfit = 'Fit'
elseif wallfitnum == '2' then
wallfit = 'Stretch'
elseif wallfitnum == '0' and wallfittile == '1' then
wallfit = 'Tile'
elseif wallfitnum == '0' and wallfittile == '0' then
wallfit = 'Center'
elseif wallfitnum == '22' then
wallfit = 'Span'
end
You can look at the code further in Sonder if you want.
But ya I also would love if Rainmeter had a !Savelayout call (as well as properly saving the fit of the wallpaper)
You do not have the required permissions to view the files attached to this post.