It is currently December 10th, 2018, 6:38 pm

Test of new Container option

Testing and discussion of the conversion of Rainmeter to D2D.
User avatar
jsmorley
Developer
Posts: 18445
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Test of new Container option

jsmorley » November 18th, 2018, 5:13 pm

dvo wrote:
November 18th, 2018, 4:57 pm
@Js Morley rainy doesn't work with me i only see the rain instead of rainy in rain..... :-(
copied script and put anim in the right folder if loaded i see only the rain updated to the latest version....
You quite sure you have installed this?

https://builds.rainmeter.net/Rainmeter-4.3-Container5.exe

As of this writing, this is still in "alpha", and is not included in the "beta" versions available on the main site. It is only distributed here in the forums, in the first post of this thread.

Edit: I added RainyWeather to the .rmskin in the first post, so you don't have to create it from scratch.
User avatar
balala
Rainmeter Sage
Posts: 7151
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Test of new Container option

balala » November 18th, 2018, 5:47 pm

EDIT: Sorry jsmorley, you beat me (again).
dvo wrote:
November 18th, 2018, 4:57 pm
@Js Morley rainy doesn't work with me i only see the rain instead of rainy in rain..... :-(
copied script and put anim in the right folder if loaded i see only the rain updated to the latest version....
Have you upgraded Rainmeter to the latest version (4.3.0.3261)? I think you haven't and are using an older version. Because for this feature the latest Rainmeter is needed. Download it in the The latest BUILD: section of the first post of this thread, install, then retry it.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3050
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Test of new Container option

eclectic-tech » November 18th, 2018, 6:47 pm

[Ditto...] :p
User avatar
dvo
Posts: 538
Joined: February 7th, 2016, 6:08 am

Re: Test of new Container option

dvo » November 18th, 2018, 7:19 pm

tnx i had the latest of the site not the container-5 version now it works..... :Whistle
User avatar
jsmorley
Developer
Posts: 18445
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Test of new Container option

jsmorley » November 21st, 2018, 4:04 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
ContainerW=300
StringX=0
U=[!UpdateMeter *][!Redraw]

[Slider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideLeft, 1, #StringWDelta#
SlideLeft=[!SetVariable StringX "(Clamp(#StringX#-5,-#StringWDelta#,0))"]#U#
ActionList2=Repeat SlideRight, 1, #StringWDelta#
SlideRight=[!SetVariable StringX "(Clamp(#StringX#+5,-#StringWDelta#,0))"]#U#
DynamicVariables=1

[MeterContainerVisible]
Meter=Image
W=(#ContainerW#+10)
H=32
SolidColor=47,47,47,255

[MeterContainer]
Meter=Image
X=5
Y=5
W=#ContainerW#
H=27
SolidColor=0,0,0,255
MouseOverAction=[!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Execute 1"]
MouseLeaveAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Execute 2"]

[MeterLongString]
Meter=String
X=#StringX#
FontSize=15
FontWeight=400
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
DynamicVariables=1
OnUpdateAction=[!SetVariable StringWDelta "(Abs(#ContainerW#-[MeterLongString:W]))"][!UpdateMeasure Slider]
Container=MeterContainer
Text=This is a long string to be clipped in a container. And I mean really, really long. No, longer than that. I mean a long, long string.
GIF.gif
You do not have the required permissions to view the files attached to this post.
User avatar
ikarus1969
Posts: 300
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Test of new Container option

ikarus1969 » November 22nd, 2018, 9:42 am

It's pure fun to play around with this new feature!

I've made the following to display the activity of the cores of your cpu. Should adapt up to 16 cores automatically.

Can't record an animated gif so i provide a static screenshot only:
Screenshot.png
INI-file:

Code: Select all

[Rainmeter]
Update=250
DefaultUpdateDivider=4
AccurateText=1
OnWakeAction=[!Refresh]
DynamicWindowSize=1
; BackgroundMode=2
; SolidColor=4080C040
ContextTitle="cc: #CURRENTCONFIGWIDTH#×#CURRENTCONFIGHEIGHT# @ (#CURRENTCONFIGX#, #CURRENTCONFIGY#)"
ContextAction=[!Redraw]

[Variables]
CPUOnly.Offset=2

CPUOnly.Border_WH=8

CPUOnly.Border.X=(#WORKAREAX# + 0.5 * #CPUOnly.Border_WH#)
CPUOnly.Border.Y=(#WORKAREAY# + 0.5 * #CPUOnly.Border_WH#)
CPUOnly.Border.W=([Meter_Visible:W] + 25 - #CPUOnly.Border_WH#)
CPUOnly.Border.H=([Meter_Visible:H] - 15 - #CPUOnly.Border_WH#)

CPUOnly.BG.X=(#CPUOnly.Border.X# + 0.5 * #CPUOnly.Border_WH#)
CPUOnly.BG.Y=(#CPUOnly.Border.Y# + 0.5 * #CPUOnly.Border_WH#)
CPUOnly.BG.W=(#CPUOnly.Border.W# - #CPUOnly.Border_WH#)
CPUOnly.BG.H=(#CPUOnly.Border.H# - #CPUOnly.Border_WH#)


CPUOnly.Core.W=(([Meter_Visible:W] - 0) / (%NUMBER_OF_PROCESSORS% - 1))
CPUOnly.Cores.X=0
CPUOnly.Cores.Y=25
CPUOnly.Cores.H=([Meter_Visible:H] - 44)

; --------------------------------------------------------------------------------
CPUOnly.Core.1.Center.X=((#CPUOnly.Cores.X# + ( 1 - 1) * #CPUOnly.Core.W#) + 6)
CPUOnly.Core.2.Center.X=(#CPUOnly.Cores.X# +  ( 2 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.3.Center.X=(#CPUOnly.Cores.X# +  ( 3 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.4.Center.X=(#CPUOnly.Cores.X# +  ( 4 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.5.Center.X=(#CPUOnly.Cores.X# +  ( 5 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.6.Center.X=(#CPUOnly.Cores.X# +  ( 6 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.7.Center.X=(#CPUOnly.Cores.X# +  ( 7 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.8.Center.X=(#CPUOnly.Cores.X# +  ( 8 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.9.Center.X=(#CPUOnly.Cores.X# +  ( 9 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.10.Center.X=(#CPUOnly.Cores.X# + (10 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.11.Center.X=(#CPUOnly.Cores.X# + (11 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.12.Center.X=(#CPUOnly.Cores.X# + (12 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.13.Center.X=(#CPUOnly.Cores.X# + (13 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.14.Center.X=(#CPUOnly.Cores.X# + (14 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.15.Center.X=(#CPUOnly.Cores.X# + (15 - 1) * #CPUOnly.Core.W#)
CPUOnly.Core.16.Center.X=(#CPUOnly.Cores.X# + (16 - 1) * #CPUOnly.Core.W#)

CPUOnly.Core.1.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C1])  / 100)
CPUOnly.Core.2.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C2])  / 100)
CPUOnly.Core.3.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C3])  / 100)
CPUOnly.Core.4.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C4])  / 100)
CPUOnly.Core.5.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C5])  / 100)
CPUOnly.Core.6.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C6])  / 100)
CPUOnly.Core.7.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C7])  / 100)
CPUOnly.Core.8.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C8])  / 100)
CPUOnly.Core.9.Center.Y= (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C9])  / 100)
CPUOnly.Core.10.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C10]) / 100)
CPUOnly.Core.11.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C11]) / 100)
CPUOnly.Core.12.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C12]) / 100)
CPUOnly.Core.13.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C13]) / 100)
CPUOnly.Core.14.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C14]) / 100)
CPUOnly.Core.15.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C15]) / 100)
CPUOnly.Core.16.Center.Y=(#CPUOnly.Cores.Y# + #CPUOnly.Cores.H# - (#CPUOnly.Cores.H# * [Measure_CPU_C16]) / 100)
; --------------------------------------------------------------------------------


; --------------------------------------------------------------------------------
; Measures
; --------------------------------------------------------------------------------
[Measure_LUA]
Measure=SCRIPT
ScriptFile=Cores.lua
UpdateDivider=-1


[Measure_CPU_C1]
Measure=CPU
Processor=1
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 1 ? 1 : 0)
; Measure=CALC
; Formula=100
; UpdateDivider=1
; Disabled=(%NUMBER_OF_PROCESSORS% < 1 ? 1 : 0)

[Measure_CPU_C2]
Measure=CPU
Processor=2
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 2 ? 1 : 0)

[Measure_CPU_C3]
Measure=CPU
Processor=3
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 3 ? 1 : 0)

[Measure_CPU_C4]
Measure=CPU
Processor=4
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 4 ? 1 : 0)

[Measure_CPU_C5]
Measure=CPU
Processor=5
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 5 ? 1 : 0)

[Measure_CPU_C6]
Measure=CPU
Processor=6
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 6 ? 1 : 0)

[Measure_CPU_C7]
Measure=CPU
Processor=7
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 7 ? 1 : 0)

[Measure_CPU_C8]
Measure=CPU
Processor=8
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 8 ? 1 : 0)

[Measure_CPU_C9]
Measure=CPU
Processor=9
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 9 ? 1 : 0)

[Measure_CPU_C10]
Measure=CPU
Processor=10
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 10 ? 1 : 0)

[Measure_CPU_C11]
Measure=CPU
Processor=11
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 11 ? 1 : 0)

[Measure_CPU_C12]
Measure=CPU
Processor=12
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 12 ? 1 : 0)

[Measure_CPU_C13]
Measure=CPU
Processor=13
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 13 ? 1 : 0)

[Measure_CPU_C14]
Measure=CPU
Processor=14
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 14 ? 1 : 0)

[Measure_CPU_C15]
Measure=CPU
Processor=15
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 15 ? 1 : 0)

[Measure_CPU_C16]
Measure=CPU
Processor=16
AverageSize=2
UpdateDivider=1
Disabled=(%NUMBER_OF_PROCESSORS% < 16 ? 1 : 0)


; --------------------------------------------------------------------------------
; Meters
; --------------------------------------------------------------------------------
[Meter_BG]
Meter=SHAPE
Shape=Rectangle #CPUOnly.Border.X#, #CPUOnly.Border.Y#, #CPUOnly.Border.W#, #CPUOnly.Border.H# | Extend Format_Border
Format_Border=StrokeWidth #CPUOnly.Border_WH# | Stroke Color FFFFFF80 | Fill Color FFFFFF00

Shape2=Rectangle #CPUOnly.BG.X#, #CPUOnly.BG.Y#, #CPUOnly.BG.W#, #CPUOnly.BG.H# | Extend Format_BG
Format_BG=StrokeWidth 0 | Stroke Color 00000000 | Fill Color FFFFFFFF

AntiAlias=1
DynamicVariables=1

; --------------------------------------------------------------------------------

[Meter_Visible_Shadow]
Meter=STRING
Text="RAINMETER"
X=10
Y=-10
InlineSetting= Face   | Arial
InlineSetting2=Size   | 48
InlineSetting3=Weight | 900
InlineSetting4=Color  | FFFFFFFF
InlineSetting5=Shadow | 2 | 2 | 3.5 | 0,0,0,255
AntiAlias=1

[Meter_Container]
Meter=STRING
Text="RAINMETER"
X=10
Y=-10
InlineSetting= Face   | Arial
InlineSetting2=Size   | 48
InlineSetting3=Weight | 900
AntiAlias=1

[Meter_Visible]
Meter=STRING
Text="RAINMETER"
X=10
Y=-10
InlineSetting= Face   | Arial
InlineSetting2=Size   | 48
InlineSetting3=Weight | 900
; InlineSetting4=Color  | 00000010
InlineSetting4=Color  | 00408030
AntiAlias=1
; --------------------------------------------------------------------------------

[Meter_Peaks]
Meter=SHAPE
Container=Meter_Container
Shape=Path Path_Cores | Stroke Color 004080FF | Fill Color 80BFFFFF
Path_Cores=#CPUOnly.Core.1.Center.X#, #CPUOnly.Core.1.Center.Y# | LineTo #CPUOnly.Core.2.Center.X#, #CPUOnly.Core.2.Center.Y#
UpdateDivider=1
AntiAlias=1
DynamicVariables=1
LUA-code

Code: Select all

function Initialize()

  local current_core;
  local curveStr;
  local path_str = '#CPUOnly.Core.1.Center.X#, (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H#) | LineTo #CPUOnly.Core.1.Center.X#, #CPUOnly.Core.1.Center.Y#';

  for current_core = 2, tonumber(os.getenv('NUMBER_OF_PROCESSORS'))
    do
      curveStr = 'CurveTo #CPUOnly.Core.'..current_core..'.Center.X#, #CPUOnly.Core.'..current_core..'.Center.Y#, ';
      curveStr = curveStr..'(#CPUOnly.Core.'..(current_core - 1)..'.Center.X# + 20), (#CPUOnly.Core.'..(current_core - 1)..'.Center.Y#), ';
      curveStr = curveStr..'(#CPUOnly.Core.'..(current_core - 0)..'.Center.X# - 20), (#CPUOnly.Core.'..(current_core - 0)..'.Center.Y#)';

      path_str = path_str..' | '..curveStr;
    end
    
  path_str = path_str..' | LineTo #CPUOnly.Core.'..tonumber(os.getenv('NUMBER_OF_PROCESSORS'))..'.Center.X#, (#CPUOnly.Cores.Y# + #CPUOnly.Cores.H#)';

  SKIN:Bang('!SetOption', 'Meter_Peaks', 'Path_Cores', path_str);

  SKIN:Bang('!UpdateMeter', '*');

  return 0;

end -- function Initialize

function Update()

  return 1;

end -- function Update
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 18445
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Test of new Container option

jsmorley » November 23rd, 2018, 2:44 pm

ikarus1969 wrote:
November 22nd, 2018, 9:42 am
Can't record an animated gif so i provide a static screenshot only:
http://blog.bahraniapps.com/gifcam/

Be aware when attaching or linking to animated .gif files, that if they exceed 500px in width or height, they will create a "thumbnail" in the post, and will need to be clicked on by the user to see the animated version .
User avatar
ikarus1969
Posts: 300
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Test of new Container option

ikarus1969 » November 23rd, 2018, 8:40 pm

jsmorley wrote:
November 23rd, 2018, 2:44 pm


http://blog.bahraniapps.com/gifcam/

Be aware when attaching or linking to animated .gif files, that if they exceed 500px in width or height, they will create a "thumbnail" in the post, and will need to be clicked on by the user to see the animated version .
Here's an anuimated view:
Screenshot Container.gif
You do not have the required permissions to view the files attached to this post.
User avatar
raiguard
Posts: 493
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

raiguard » November 24th, 2018, 6:14 am

A note that transformationmatrix definitely does NOT play nice with container meters. :(

Anyway, here is a line graph with rounded corners. You can scale the skin by scrolling the mouse wheel.
2018-11-23 23_16_46-.png

Code: Select all

[Rainmeter]
MiddleMouseUpAction=[!Refresh]
AccurateText=1
DynamicWindowSize=1
Update=100

[Variables]
scale=5

[MeasureCpuUsage]
Measure=CPU
MinValue=0
MaxValue=100

[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,(144 * #scale#),(40 * #scale#),(3 * #scale#) | Fill Color 50,50,50 | StrokeWidth 0
Shape2=Rectangle #scale#,#scale#,(142 * #scale#),(38 * #scale#),(3 * #scale#) | Fill Color 25,25,25 | StrokeWidth 0
MouseScrollUpAction=[!WriteKeyValue Variables scale "(clamp((#scale# + 0.5),1,5))"][!Refresh]
MouseScrollDownAction=[!WriteKeyValue Variables scale "(clamp((#scale# - 0.5),1,5))"][!Refresh]

[MeterGraphContainer]
Meter=Shape
Shape=Rectangle #scale#,#scale#,(142 * #scale#),(38 * #scale#),(3 * #scale#) | StrokeWidth 0

[MeterLineGraph]
Meter=Line
LineCount=1
MeasureName=MeasureCpuUsage
LineColor=43,224,224
Container=MeterGraphContainer
W=142
H=38
TransformationMatrix=#scale#;0;0;#scale#;#scale#;#scale#
Antialias=1
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
balala
Rainmeter Sage
Posts: 7151
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Test of new Container option

balala » November 24th, 2018, 7:24 am

raiguard wrote:
November 24th, 2018, 6:14 am
A note that transformationmatrix definitely does NOT play nice with container meters. :(

Anyway, here is a line graph with rounded corners. You can scale the skin by scrolling the mouse wheel.
But what is the issue? Because me personally at least couldn't find one. The code works as it should. Am I missing something?