It is currently September 29th, 2024, 3:27 pm

Skin Browsing Skin

General topics related to Rainmeter.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Skin Browsing Skin

Post by exper1mental »

killall-q wrote:Stick this at the end of Update():

Code: Select all

   for k = i, lineMax do
      SKIN:Bang('[!SetOption Skin'..k..' Text ""][!SetOption Skin'..k..' MeterStyle ""]')
   end
Inside SetScroll():

Code: Select all

   if n < 0 and lineScroll > 1 or n > 0 and lineScroll + lineMax <= numSkins then
That worked once I added [!UpdateMeter #CURRENTSECTION#][!Redraw] after all [!CommandMeasure mScript SetScroll()] bangs. Without that there is an issue where when you scroll all the way down and it hides some of the entries, they won't reappear sometimes when you scroll back up. Not sure why the combination of [!UpdateMeter #CURRENTSECTION#] and [!Redraw] fixed it though.
killall-q wrote:For loading/unloading a skin quickly, it's going to move between the lists each time you do so and you'll have to go hunt for it in the list each time. It's better if it stays in the same place, and near related skins.
Ah that is true, but I do want a list with only active skins. The other one could have both. Depending on how I implement it I could set it up so that the end-user can select to view active, inactive, or both.

Anyways, I'll probably upload something in the next two days with what I have made so far.
Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Skin Browsing Skin

Post by eclectic-tech »

killall-q wrote:... There was an issue where the !SetOptions in MouseOver/LeaveAction would lock those options so that the !SetOptions from lua would stop working until refresh, so I just changed the mouseovers to set different options. I would still like to know the cause of this and if it's a bug. Tacking [!Update][!Redraw] on the lua bangs did not help.
...
Thanks for the update, especially the table.sort (had problems getting the syntax right :? )

There was NO bug; as you mentioned it was the !SetOptions from lua, so modifying the mouseover corrected it.

I have almost 500 skins listed, so I prefer "paging" over scrolling, but I like the idea that no external file is needed and no variables have to be written back to ini file! I will play with the "step" to see what works best for me.

Here's what I have right now (expanded menu, close/hide skins [X]. highlighted mouseover):
SB4.png
@exper1mental

I will wait to see what you can do with the FileView plugin; one scheme I have used with FileView in the past, is to separate the meters into an @include file (it allows for multiple number of meters to be loaded, based on the users preference (20meters.inc, 30meter.inc, etc.) or by an option in the skin.

Thanks to all!
Like killall-q, I am finding this beta more useful than I originally thought!
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on October 15th, 2018, 12:54 pm, edited 1 time in total.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Skin Browsing Skin

Post by exper1mental »

I've hit a few snags (mainly relating to lua code ofc :D :p ) so here is what I have so far.
SkinBrowserAlpha.rmskin
There are four tabs for viewing skins. All skins, active, inactive, and browse skins folder. The first three read the Rainmeter.ini file while the third uses FileView.

Both the Active and Inactive tabs don't display quite right yet because I'm still trying to get the lua function DetectSkins to only find skins that are active or inactive. It should be noted that the Active= parameter is also used for Zposition (with the exception of AlwaysOnTop), so its not always equal to either 1 or 0.


The problem I've run into with FileView is I need a way to get convert the file path (i.e. MeasurePath=G:\Users\Username\Documents\Skins\ExampleSkin\ExampleSubfolder) to only display what is after Skins\ (which for my example would be ExampleSkin\ExampleSubfolder). If someone or I can figure out a way to do this I can use the load button you see when you hover over Browse Skins Folder entries to load the skin into rainmeter.

Additionally, I'm hoping to find a way (probably with lua) to not display the load button unless the entry contains ".ini" (which should mean it is a rainmeter skin).


I also through in some buttons and stuff to give a taste of how the final product might look.
You do not have the required permissions to view the files attached to this post.
Image
User avatar
jsmorley
Developer
Posts: 22790
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Browsing Skin

Post by jsmorley »

It should be noted that the Active= parameter is also used for Zposition (with the exception of AlwaysOnTop), so its not always equal to either 1 or 0.
Actually, what Active= indicates in Rainmeter .ini is that the [ConfigName] is either unloaded, (0) or indicates which .ini variant in the folder, sorted alphabetically by file name, is loaded. (anything other than 0)

If you have a config folder:

Skins\MyClocks\
Skins\MyClocks\BlackClock.ini
Skins\MyClocks\WhiteClock.ini

When WhiteClock.ini is loaded, [MyClocks] will have Active=2.

So Active=1 is not quite the same as "config is loaded", but rather "first variant is loaded". Of course, in a config folder with only one .ini file, this is a distinction without a difference. Just don't depend on the value of Active being "1" to indicate "loaded". It is really "non-zero".

It really has nothing to do with LoadOrder / Z-Position.

Note: I have not closely followed this thread or looked any code, but I caution that any skin browser that isn't driven to the .ini level can't work. You can't just list config names and toggle them loaded / unloaded. Many skins, certainly Enigma and others, have more than one variant .in file in a given config. You can unload skins at the "config" level, but to load them, or edit them, or even just view Metadata, is going to require that the correct .ini file is selected.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Skin Browsing Skin

Post by fonpaolo »

This is very basic but will do the work:

Code: Select all

[MeterFind]
Measure=Time
Format=MeasurePath=G:\Users\Username\Documents\Skins\ExampleSkin\ExampleSubfolder
RegExpSubstitute=1
Substitute=".*\\Skins\\(.*)$":"\1"
DynamicVariables=1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Skin Browsing Skin

Post by eclectic-tech »

@exper1mental

I tried your alpha version and I like where it is headed. :thumbup:

I had been working on a FileView plugin version mostly because the rainmeter.ini file shows me only skins that have been loaded at one time or another; my rainmeter.ini file has skins I have deleted, and no skins that I have downloaded, but never tried...

I have attached my version(s) below. It uses the FileView plugin only (no lua) (add rainmeter.ini script) to list all of the users skin folders (once the #mypath# variable is set in the @Resources\UserVariables.inc file). I used a modified RegExpSubstitute from fonpaolo earlier post, to track the current config...
Thanks fonpaolo! :great:

It can display between 10 and 40 50 items at a time (click '+' to change), scroll line-by-line with mousewheel, or page up/down using the top/bottom info bars (borrowed that idea from you), hide all of the meters (right-click the 'X' button; gets out of the way of LARGE skins), open !Manage, open !About/Log, !Refresh, !Refresh All, list size (+/-) buttons.

It has the advantage of viewing any skin .ini that is in the Skins folder, also you can open any file that Windows can open (I did not limit the list to only .ini file; that could be an option later), and it deals directly with the .ini files to Activate/Deactivate skins.

Left-click navigates/opens files, MiddleMouseUpAction Activates a .ini file, and Right-click DeActivates loaded skins.

Granted, it does not show you which skins are active, but for me that is not an issue. I wanted something to view skins quickly and this seems to suit me.

I hope you will try it and feel free to incorporate any of it in your release. Credits for everyone participating in this thread are in the package. Let me know your impression.

EDIT: See strikeouts above (added script and metadata)... moving on to other interests... have fun with this!
SkinViewr1.png
Updated screenshot v1.1
opus2.png
SkinViewer_1.1.rmskin
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on October 15th, 2018, 12:56 pm, edited 2 times in total.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Skin Browsing Skin

Post by exper1mental »

@jsmorley
Ah, I see. Thanks for the clarification.

@fonpaolo
That'll do the trick, thanks!

@eclectic-tech
You know you can use the variable #SKINSPATH# to determine the skins folder :D :p

I'll definitely play around with it more when I have some spare time.
Image
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Skin Browsing Skin

Post by fonpaolo »

You're welcome! :D
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Skin Browsing Skin

Post by eclectic-tech »

exper1mental wrote:@eclectic-tech
You know you can use the variable #SKINSPATH# to determine the skins folder :D :p
You're right! How did I overlook that?! :handtohead: