first of all: this is a worthless bit of information. Windows just does not work that way. there is no such thing as "the recycle bin is 50% full", at least not if you are using more than one volume drive. each drive has it's own hidden folder with it's own maximum capacity. so your recyle bin for drive C: might be completely empty while the recyle bin for drive D: might be almost full.
anyways, there are many Rainmeter skins that aren't really useful, so let's add another one.
basically it's really simple. you just add a MaxValue to your measure.
http://docs.rainmeter.net/manual/measures/general-options#MaxValue
Code: Select all
[MeasureBinSize]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Size
MaxValue=10485760
but how do we get that MaxValue?
well, you just need to read the maximum capacities for the single drives from the registry (those are in MB) and add them up:
http://docs.rainmeter.net/manual/measures/registry
Code: Select all
[Capacity1]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{4efed059-dc8c-11e1-a322-806e6f6e6963}
RegValue=MaxCapacity
[Capacity2]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{b9af5e5e-dcbe-11e1-96fc-001f16cfcec9}
RegValue=MaxCapacity
...
[MaxCapacity]
Measure=Calc
Formula=([Capacity1]+[Capacity2]+...)*1024*1024
DynamicVariables=1
but that involves the GUIDs for the individual drives. how do we get those? let's get a list of these from the registry. that's not possible with Rainmeter though. you'll need to use the reg query command that comes with Windows. use this from the command line:
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume"
and you'll get a list of registry keys similar to this:
Code: Select all
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{4efed059-dc8c-11e1-a322-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{4efed05a-dc8c-11e1-a322-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{b9af5e5e-dcbe-11e1-96fc-001f16cfcec9}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{b9af5e65-dcbe-11e1-96fc-001f16cfcec9}
looks like a task for the RunCommand plugin:
http://rainmeter.net/forum/viewtopic.php?f=18&t=16715
Code: Select all
[Command_1]
Measure=Plugin
Plugin=RunCommand
Parameter="reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume""
FinishAction=[!UpdateMeasureGroup Drives]
OutputType=Ansi
and now let's use some regular expression substitutes to get the individual GUIDs:
Code: Select all
[Drive1]
Measure=Calc
Formula=1
DynamicVariables=1
Group=Drives
UpdateDivider=-1
RegExpSubstitute=1
Substitute="1":"[Command_1]","\n":"","^.*?\{(.*?)\}.*$":"\1","^HKEY.*$":""
OnUpdateAction=[!UpdateMeasure Capacity1]
[Drive2]
Measure=Calc
Formula=1
DynamicVariables=1
Group=Drives
UpdateDivider=-1
RegExpSubstitute=1
Substitute="1":"[Command_1]","\n":"","^.*?\{(.*?)\}.*?\{(.*?)\}.*$":"\2","^HKEY.*$":""
OnUpdateAction=[!UpdateMeasure Capacity2]
...