Adding more Hard Drives to Elementary

4 min read

Deviation Actions

FlyingHyrax's avatar
By
Published:
6.5K Views
(For deliprofesor and Hippokrates)

First things first, we'll need to add more variables for the hard drives you want to monitor.  There are several ways to do this (and you could get by without doing it at all and just hardcoding the drive letters into the skin) but the most useable way is probably to add them to Settings.txt.  I just added two more variables below the one that is already there in Settings.txt.  You can name them whatever you want as long as the names are all different.

drive=C
drive2=H
drive3=D

Now that that's out of the way, we have to add measures for the extra hard drives.  In either system skin (eSystem1 or eSystem2), you can pretty much just copy the current [msrDrive] measure for as many hard drives as you need, just change the name of each instance ([msrHardDrive2], [msrHardDrive3], etc.) and change the #drive# variable to the name of the correct variable in Settings.txt.  Like so:

[msrDrive]
Measure=FreeDiskSpace
Drive=#drive#:
InvertMeasure=1
UpdateDivider=10

[msrDrive2]
Measure=FreeDiskSpace
Drive=#drive2#:
InvertMeasure=1
UpdateDivider=10
IgnoreRemovable=0

[msrDrive3]
Measure=FreeDiskSpace
Drive=#drive3#:
InvertMeasure=1
UpdateDivider=10
IgnoreRemovable=0

(I added "IgnoreRemovable=0" so that the new measures would work with my USB drives.  You don't need it if all your drives are internal.)

Lastly, we need to add corresponding meters for each measure that we added.  Again, there are lots of ways to do this, I'll just show a few different configurations.  First, for "eSystem2.ini" I did this:

[mtrDrive]
Meter=STRING
MeasureName=msrDrive
MeterStyle=sText3
X=0
Y=5R
Percentual=1
Text="HD#drive# %1%"

[mtrDrive2]
Meter=STRING
MeasureName=msrDrive2
MeterStyle=sText3
X=0
Y=5R
Percentual=1
Text="HD#drive2# %1%"

[mtrDrive3]
Meter=STRING
MeasureName=msrDrive3
MeterStyle=sText3
X=0
Y=5R
Percentual=1
Text="HD#drive3# %1%"

You just have to copy the original ([mtrDrive]), but change the name of the meter, the MeasureName, and the variable used in the "Text=" line so that the right meters show the right drives.  Using this code in eSystem2.ini makes the skin look like this:



Changing the meters in eSystem1.ini is a little more difficult, only because you have to change all of the X positions manually.  The important thing to remember is that the meters are all spaced 150 px apart.  So when you add in a meter, to get it's X position just add 150 to the X of the meter before it.

[mtrDrive]
Meter=STRING
MeasureName=msrDrive
MeterStyle=sText3
X=300
Y=0
Percentual=1
Text="HD#drive# %1%"

[mtrDrive2]
Meter=STRING
MeasureName=msrDrive2
MeterStyle=sText3
X=450
Y=0
Percentual=1
Text="HD#drive2# %1%"

[mtrDrive3]
Meter=STRING
MeasureName=msrDrive3
MeterStyle=sText3
X=600
Y=0
Percentual=1
Text="HD#drive3# %1%"

Using the above code, you'll also need to change the X value in [mtrNet] to 750 so that things don't overlap.  The finished product looks like this:



If you want to use up less horizontal space, you can combine the two different layouts, putting everything horizontally like in eSystem1 but stacking the HD meters like in eSystem2:

[mtrDrive]
Meter=STRING
MeasureName=msrDrive
MeterStyle=sText3
X=300
Y=0
Percentual=1
Text="HD#drive# %1%"

[mtrDrive2]
Meter=STRING
MeasureName=msrDrive2
MeterStyle=sText3
X=300
Y=5R
Percentual=1
Text="HD#drive2# %1%"

[mtrDrive3]
Meter=STRING
MeasureName=msrDrive3
MeterStyle=sText3
X=300
Y=5R
Percentual=1
Text="HD#drive3# %1%"

[mtrNet]
Meter=STRING
MeasureName=msrNetUp
MeasureName2=msrNetDown
MeterStyle=sText3
X=450
Y=0
W=200
H=15
AutoScale=1
NumOfDecimals=0
Text="NET %1/%2"

That should look something like this:



And that's that.  You can theoretically add in as many or as few drives as you want, just make sure that:
- the variable names for the drives are all different
- The Measure and Meter names are all different
- The right Variables are used in the right Measure which are used in the right Meters.
(That's why numbering them is so convenient, it helps make sure everything matches.)

Hopefully this will help both of you out; let me know if you have questions or problems.
© 2011 - 2024 FlyingHyrax
Comments1
Join the community to add your comment. Already a deviant? Log In
Thank you for this quick and detailed answer :) I added your codes and looking great now! [link]