It is currently October 27th, 2021, 11:33 pm

Dynamic skin creation - is it possible?

Help with creating, editing & fixing problems with skins
User avatar
Edhel
Posts: 36
Joined: February 18th, 2014, 4:41 pm

Dynamic skin creation - is it possible?

Post by Edhel »

I had an idea that might be crazy and I would love to hear from you, the more experienced Rainmeter creators than me, if there is a way to do it or not.
Is it possible to add skin into a theme on a "click"? I am talking about the whole "skin", not meter or measure. Let's say I have a theme and want to have an app launcher. I don't know how many apps does the user want to have there, two, five, twenty... So I create an interface skin where the user enters the app exe file location, name and maybe selects icon. The users click on "Do the magic" button, and as a result a new skin is added to his desktop.
Why create a whole new skin?
- Let's say I want to have office launcher skins on the left of my screen, games on the right and then some other apps in between. And I want to have the option to move each skin independently.
How to do this?
- I believe LUA should be able to write a new file and hopefully also a new folder. Could somebody confirm it? Of course, the file or rather folder name has to be unique so the skin folder would be called something like "launcher_24".
- If LUA is able to create a new file, it should be pretty easy to copy a file - a template for the launcher skin - and just replace couple of variables - path to exe file, label, icon...
- Is there a way how to place the skin on the desktop without the need to refresh whole Rainmeter? To reload list of configs?
- Is there a way to detect that the skin was removed from desktop (deactivated) and if so, can LUA delete the hidden skin file and folder?

I haven't worked with Rainmeter for some time now so I have lost track of what is possible and what is not. Maybe it is still just a dream maybe it is already possible. The app launcher is one possible application. Or we could have an aquarium theme with variable number of fish in it. Or - and that was my original idea - we could finally create a Lego theme where the user could create an indefinite number of bricks from the template and build with them whatever he/she wants :) Please, help me make that happen :D
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: Dynamic skin creation - is it possible?

Post by death.crafter »

N. O.
from the Realm of Death
My Current Desktop
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: Dynamic skin creation - is it possible?

Post by death.crafter »

If you want it that badly, you can use PowershellRM, which will create a skin, place it,

Writekeyvalue OnRefreshAction to
- - - ActivateConfig NewConfig and
- - - Writekeyvalue OnRefreshAction to blank.

Then define a function that will delete the config upon deactivation, tho deactivation should not be triggered by OnCloseAction.
from the Realm of Death
My Current Desktop
User avatar
David8192
Posts: 50
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Dynamic skin creation - is it possible?

Post by David8192 »

I feel that it is possible, though an overwhelming amount of work would be required - of course without lua or Powershell.
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: Dynamic skin creation - is it possible?

Post by death.crafter »

David8192 wrote: September 15th, 2021, 8:04 am I feel that it is possible, though an overwhelming amount of work would be required - of course without lua or Powershell.
And how would it be?
from the Realm of Death
My Current Desktop
User avatar
David8192
Posts: 50
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Dynamic skin creation - is it possible?

Post by David8192 »

Code: Select all

!EditSkin
and lots of

Code: Select all

!WriteKeyValue
. A text input box for the user to specify some crucial elements such as config name, Update, number of measures and meters, etc and to choose the type of skin(time, whether, etc.).
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: Dynamic skin creation - is it possible?

Post by death.crafter »

David8192 wrote: September 15th, 2021, 11:05 pm

Code: Select all

!EditSkin
and lots of

Code: Select all

!WriteKeyValue
. A text input box for the user to specify some crucial elements such as config name, Update, number of measures and meters, etc and to choose the type of skin(time, whether, etc.).
Its not about writing a skin. A ini file can be writren with lua instead of a lot of WriteKeyValue.

The problem is activating it. You can't do that without a !RefreshAll.

Also !EditSkin will just open the current config or given config in the default rainmeter editor.
from the Realm of Death
My Current Desktop
User avatar
David8192
Posts: 50
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Dynamic skin creation - is it possible?

Post by David8192 »

A ini file can be writren with lua instead of a lot of WriteKeyValue.
Mostly I was just thinking of giving Rainmeter the credit that it is due. Why give the job to Lua when it can be done internally?
Importantly, with or without lua, the effort put in is not going to be any less. Honestly it would be quite easy if the skins to be made have the same components(e.g. Always create a date skin). But if at one point the user wants a timer and at another a music visualizer, yeah.... it will be very demanding regardless of the method.
You can't do that without a !RefreshAll.
That is a fact we should embrace. There are no 2 ways about it.
!EditSkin will just open the current config or given config in the default rainmeter editor.
I am aware of that and my target is
given config
for possible quick ...or thorough... analysis and perhaps folder creation
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: Dynamic skin creation - is it possible?

Post by death.crafter »

David8192 wrote: September 16th, 2021, 10:06 pm Mostly I was just thinking of giving Rainmeter the credit that it is due. Why give the job to Lua when it can be done internally?
Because it's easier and more potent.
from the Realm of Death
My Current Desktop
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Dynamic skin creation - is it possible?

Post by sl23 »

death.crafter wrote: September 17th, 2021, 6:02 am Because it's easier and more potent.
Easier if you know lua! :sly: