It is currently April 18th, 2024, 10:13 pm

Plasma Chamber

Skins that control functions in Windows or Rainmeter
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Plasma Chamber

Post by MerlinTheRed »

Image
Direct Link
A collection of simple bars you can place at the right edge of your screen. It should also be very easy to create your own bars. All you need is a measure that provides values between 0 and 1. The code of each bar is minimal as all the common elements are outsourced into an include file.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
Lightz39
Posts: 98
Joined: August 1st, 2012, 12:48 am

Re: Plasma Chamber

Post by Lightz39 »

Very clean. Good work.
User avatar
Xi.Cynx
Posts: 31
Joined: August 1st, 2012, 2:14 am
Location: Elyria, OH

Re: Plasma Chamber

Post by Xi.Cynx »

I contacted you on DevArt, but I figured two spots is better to be seen than one! So here it is:

This is a FANTASTIC SKIN! Especially with the option of being able to change the colors of it. I was able to get it to fit perfectly with my ROG theme.

One thing I was wondering. I have been able to edit this into every skin I have used for rainmeter, but with how you have yours setup, I find it pretty difficult. Maybe you might be able to add some insight on how this can be done so I don't have to use a random offset skin from my previous one.

I have a Netmeter, they are bars just like how you have yours setup.

Download Speed
Upload Speed
Ping

Only thing is, I can't seem to figure out how to implement it with yours. I have all the measures, meters and variables in one section, where you have yours spread out over 3-4 different files. If I give you the code I am working with through a PM, would you be able to let me know how I could implement this into your skin? Thanks for taking the time in reading and hope to hear back from you soon!
Do unto others as you would have them do unto you...said the rapist

Main Rig: i7 4770k | ASRock Z97E-ITX/ac | 16GB DDR3-1600 | 500GB Samsung 840 EVO | EVGA GTX 780 | Nexus 5000
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Plasma Chamber

Post by MerlinTheRed »

If you're not comfortable showing your code to the public here you're welcome to PM me.

The reason why I have my code spread over multiple files (well, essentially two for each skin) is that I didn't want to repeat the same code in each and every meter, as they are completely the same except for the text and the value that is displayed. I therefore created a variable "BarText" and a variable "Measure". Those are set by each individual skin. The "Master" file uses these values to display the bar correctly. This makes it somewhat difficult to customize and add new functionality to a bar that changes the existing behavior. Adding stuff isn't hard though, and an upload/download/ping should definitely be doable. I've also gotten a request to add a battery meter, which is equally simple (I think).
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Xi.Cynx
Posts: 31
Joined: August 1st, 2012, 2:14 am
Location: Elyria, OH

Re: Plasma Chamber

Post by Xi.Cynx »

Okay, I have no problems pasting the code in here for you to just plug in. I'll put it down below for you! :sly:

I know there is probably a lot of code in there that you will not use, but at least more of the stuff that is needed would be included.

Code: Select all

[Variables]
MaxDownload=(Max download speed in bits)
MaxUpload=(Max upload speed in bits)
DestinationAddress=(Insert IP or URL here)

----------
; Measures
----------
[MeasureNetIn]
Measure=NetIn
NetInSpeed=#MaxDownload#

[MeasureNetOut]
Measure=NetOut
NetOutSpeed=#MaxUpload#

[MeasurePing]
Measure=Plugin
Plugin=Plugins\PingPlugin
DestAddress=#DestinationAddress#


----------
; Meters
----------
[MeterDownloadLabel]
Meter=STRING
MeterStyle=StyleLeftText
X=10
Y=80
W=190
H=14
Text="Download"

[MeterDownloadValue]
Meter=STRING
MeterStyle=StyleRightText
MeasureName=MeasureNetIn
X=200
Y=0r
W=190
H=14
Text="%1B/s"
NumOfDecimals=1
AutoScale=1k

[MeterDownloadBar]
Meter=BAR
MeterStyle=StyleBar
MeasureName=MeasureNetIn
X=10
Y=92
W=190
H=1

[MeterUploadLabel]
Meter=STRING
MeterStyle=StyleLeftText
X=10
Y=60
W=190
H=14
Text="Upload"

[MeterUploadValue]
Meter=STRING
MeterStyle=StyleRightText
MeasureName=MeasureNetOut
X=200
Y=0r
W=190
H=14
Text="%1B/s"
NumOfDecimals=1
AutoScale=1k

[MeterUploadBar]
Meter=BAR
MeterStyle=StyleBar
MeasureName=MeasureNetOut
X=10
Y=72
W=190
H=1

[MeterPingLabel]
Meter=STRING
MeterStyle=StyleLeftText
X=10
Y=100
W=190
H=14
Text="Ping"

[MeterPingValue]
UpdateRate=1
Meter=STRING
MeterStyle=StyleRightText
MeasureName=MeasurePing
X=200
Y=0r
W=190
H=14
Text="%1"
NumOfDecimals=0
Do unto others as you would have them do unto you...said the rapist

Main Rig: i7 4770k | ASRock Z97E-ITX/ac | 16GB DDR3-1600 | 500GB Samsung 840 EVO | EVGA GTX 780 | Nexus 5000
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Plasma Chamber

Post by MerlinTheRed »

Well, the NetIn/Out part is easy. Just make a new skin and use [MeasureNetIn]/[MeasureNetIn:MaxValue] as the Measure:

Code: Select all

[Rainmeter]
 @include=#@#Master.inc
 
[Variables]
 Measure="([MeasureNetIn:]/[MeasureNetIn:MaxValue])"
 BarText="Download" 
 MaxDownload=(Max download speed in bits)
 
 ;Measures
 ;======================================
 
[MeasureNetIn]
 Measure=NetIn
 NetInSpeed=#MaxDownload#
The Ping part is more difficult, because you first need to think of a way to represent the ping latency as a value between 0 and 1. Perhaps you can set a maximum latency and then divide the value of the Ping measure by this maximum value (just like the NetIn is divided my the measure's max value).

That's basically all you need if you don't want to add extra functionality (like do something when clicking on the bar etc.). Create a measure, then set the #Measure# variable to something that results in a value between 0 and 1.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Xi.Cynx
Posts: 31
Joined: August 1st, 2012, 2:14 am
Location: Elyria, OH

Re: Plasma Chamber

Post by Xi.Cynx »

Okay, that makes sense, I will see what I can do and once I get it all working I will give it to you so you can implement it if you wish. One other thing. How difficult would it be to implement the actual download amount into the bar instead of just the word 'Download' in the BarText? I feel like this should be fairly easy but I could be wrong seeing as it looks like you have that particular section setup for static text instead of dynamic.



EDIT: I believe I have found a bug in regards to graphs related to the update speed. On my current upload/download/ping graphs, I have my update speed set to 1000(or 1 second). I noticed on your skin you have the update interval set to 100(or 1/10th of a second). Well, On my graphs the bars reach the end with no problems. On your skin the graphs don't even make it all the way to the end. So I manually set the Update to 1000 and it reaches farther than the end(Not sure if it was meant to do that or not, screenshot is below). So that brings me to the conclusion that there is something linked with displaying a histogram or bar graph that is linked with the upload and download amount. Hopefully this will be picked up on by one of the devs so they can take a look into this.

Please note that this does not happen when the CPU's are stressed to 100% load, they stop at the end of the bar, they do not go over the end like you see in the image below for the Download.

I have successfully gotten the ping to work correctly(as far as I know).


In this picture you will see how the download bar is actually extending past the end of the image where it should be set inside of.
Image
Do unto others as you would have them do unto you...said the rapist

Main Rig: i7 4770k | ASRock Z97E-ITX/ac | 16GB DDR3-1600 | 500GB Samsung 840 EVO | EVGA GTX 780 | Nexus 5000
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Plasma Chamber

Post by MerlinTheRed »

Normally, the update of any bar except the cpu ones should be 1000, as that is the default update speed I set in Master.inc. Your problem is most likely due to an incorrect setting of NetInSpeed. From the documentation it's not really clear if this value is given in bits or bytes and if it's per second or per update cycle. Rgeardless of that I should implement something to prevent bars extending more than the maximum width.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Xi.Cynx
Posts: 31
Joined: August 1st, 2012, 2:14 am
Location: Elyria, OH

Re: Plasma Chamber

Post by Xi.Cynx »

Awesome, glad to hear that. When you do let me know and I will promptly override the necessary files. :D
Do unto others as you would have them do unto you...said the rapist

Main Rig: i7 4770k | ASRock Z97E-ITX/ac | 16GB DDR3-1600 | 500GB Samsung 840 EVO | EVGA GTX 780 | Nexus 5000
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Plasma Chamber

Post by MerlinTheRed »

Updated the skin on deviantart.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!