It is currently March 28th, 2024, 11:11 pm

My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Get help with creating, editing & fixing problems with skins
User avatar
Rambytes
Posts: 27
Joined: August 30th, 2017, 10:36 pm

My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Post by Rambytes »

Hi everyone, I know i'm asking lots of question, but for a while this will be my last one ;-)

I have a HDD activity meter in Rainmeter (Blue for read, Red for write and White for both). But Can I have, instead of a shape, have a letter?

I want to have the letter R and W, side by side, with the color 255,255,255,50. When a drive is read, Only the letter R will be WHITE, same for the W when the drive is writing.

I've try by myself but i've mess up the code. This is the code i'm using, and wathever the code someone can provide, it's not a problem to change my code.

Code at the beginning

Code: Select all

[RoundlineStyle]
W=5
H=5
Padding=9,9,5,5
StartAngle=4.712
RotationAngle=6.283
LineLength=7
Solid=1
AntiAlias=1
AutoScale=1

[MeasureTotalDisk1]
Measure=FreeDiskSpace
Drive=#Disk1#
Total=1
UpdateDivider=3
IgnoreRemovable=0
IfCondition=(MeasureTotalDisk1=0)
IfTrueAction=[!HideMeterGroup "Disk1"]
IfFalseAction=[!ShowMeterGroup "Disk1"]

[MeasureDiskRead1]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Read Bytes/sec
PerfMonInstance=#Disk1#

[MeasureDiskWrite1]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Write Bytes/sec
PerfMonInstance=#Disk1#
IfCondition=((MeasureDiskRead1=0)&&(MeasureDiskWrite1=0))
IfTrueAction=[!SetOption MeterDisk1Activity LineColor "#NoActivityColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition2=((MeasureDiskRead1>0)&&(MeasureDiskWrite1=0))
IfTrueAction2=[!SetOption MeterDisk1Activity LineColor "#ReadingColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition3=((MeasureDiskRead1=0)&&(MeasureDiskWrite1>0))
IfTrueAction3=[!SetOption MeterDisk1Activity LineColor "#WritingColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition4=((MeasureDiskRead1>0)&&(MeasureDiskWrite1>0))
IfTrueAction4=[!SetOption MeterDisk1Activity LineColor "#BothColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
This is the code to display the meter

Code: Select all

[MeterDisk1Activity]
Meter=Roundline
MeterStyle=RoundlineStyle
X=2
Y=18
Group=Disk1

[MeterDisk1]
Meter=String
MeterStyle=StringStyle
Group=Disk1
So, at the end I want like the C drive
Image

Possible of too complicated?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Post by jsmorley »

First and foremost, I would not ever, ever use the Perfmon plugin anymore. Do switch over to using the UsageMonitor plugin instead.

Ok, so to get what I think you are going for, I might do:

Code: Select all

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

[Variables]
Drive1=C:
OffLight=137,137,137,255
GreenLight=105,209,115,255
CoralLight=244,125,67,255
BarFore=106,90,255,255
BarBack=58,49,113,255

; Drive Measurements

[MeasureTypeDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
Type=1
IgnoreRemovable=0
UpdateDivider=2

[MeasureLabelDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
Label=1
IgnoreRemovable=0
UpdateDivider=2

[MeasureTotalDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
Total=1
IgnoreRemovable=0
UpdateDivider=2

[MeasureFreeDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
IgnoreRemovable=0
UpdateDivider=2

[MeasureUsedDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
InvertMeasure=1
IgnoreRemovable=0
UpdateDivider=2

; Drive Reads / Writes

[MeasureDrive1Reads]
Measure=Plugin
Plugin=UsageMonitor
Category=LogicalDisk
Counter=Disk Reads/sec
Name=#Drive1#
IfCondition=MeasureDrive1Reads > 0
IfTrueAction=[!SetOption MeterDrive1Read FontColor "#GreenLight#"][!UpdateMeter MeterDrive1Read][!Redraw]
IfFalseAction=[!SetOption MeterDrive1Read FontColor "#OffLight#"][!UpdateMeter MeterDrive1Read][!Redraw]

[MeasureDrive1Writes]
Measure=Plugin
Plugin=UsageMonitor
Category=LogicalDisk
Counter=Disk Writes/sec
Name=#Drive1#
IfCondition=MeasureDrive1Writes > 0
IfTrueAction=[!SetOption MeterDrive1Write FontColor "#CoralLight#"][!UpdateMeter MeterDrive1Write][!Redraw]
IfFalseAction=[!SetOption MeterDrive1Write FontColor "#OffLight#"][!UpdateMeter MeterDrive1Write][!Redraw]

; Meters

[MeterDrive1Label]
Meter=String
MeasureName=MeasureLabelDrive1
X=0
Y=0
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
Text=#Drive1#\%1

[MeterDrive1Read]
Meter=String
X=0
Y=3R
FontSize=12
FontWeight=700
FontColor=#OffLight#
SolidColor=0,0,0,1
AntiAlias=1
Text=R

[MeterDrive1Write]
Meter=String
X=3R
Y=0r
FontSize=12
FontWeight=700
FontColor=#OffLight#
SolidColor=0,0,0,1
AntiAlias=1
Text=W

[MeterDrive1Used]
Meter=Bar
MeasureName=MeasureUsedDrive1
X=8R
Y=1r
W=120
H=13
BarColor=#BarFore#
SolidColor=#BarBack#
BarOrientation=Horizontal
GIF.gif
https://docs.rainmeter.net/manual/plugins/usagemonitor/
https://docs.rainmeter.net/manual/meters/bar/

The measures for Total and Free disk space are not really needed in this scenario, as you are only using Used disk space, but I put them there in case you changed your mind and want to expand a bit on what is displayed.
You do not have the required permissions to view the files attached to this post.
User avatar
Rambytes
Posts: 27
Joined: August 30th, 2017, 10:36 pm

Re: My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Post by Rambytes »

what is the problem with perfmon?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Post by jsmorley »

Rambytes wrote:what is the problem with perfmon?
It has been deprecated in favor of the UsageMonitor plugin, which is more capable, and MUCH more efficient.

https://docs.rainmeter.net/manual/plugins/usagemonitor/#Performance
User avatar
Rambytes
Posts: 27
Joined: August 30th, 2017, 10:36 pm

Re: My last question for a while :) (How to have a letter R and W instead of a "circle" for HDD Activity?)

Post by Rambytes »

thanks again for the help..... You cannot know how is very appreciated....

Kudos to you.... thanks again!!!!!

Hi Five