It is currently September 30th, 2024, 1:33 am

Rainmeter as an Avedesk alternative

General topics related to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter as an Avedesk alternative

Post by jsmorley »

santa_ryan wrote:As for detecting removable external hard drives,
You could check for a 0 gigabytes total/remaining, and if true hide the skin and if false show the skin.

I've always done that as I didn't know morley had a plugin to detect what kind of drive it was, and it works extremely well.
And with the latest beta of Rainmeter you don't need the plugin, as the capability is built into the FreeDiskSpace measure. http://rainmeter.net/cms/Measures-FreeDiskSpace_beta
the_barber
Posts: 4
Joined: March 5th, 2011, 5:06 pm

Re: Rainmeter as an Avedesk alternative

Post by the_barber »

Hi!

Thanks for the help so far. At last, I've got a result that I can live with. The icons run smoother than with AveDesk, there are no crashes and I even got some things working, that weren't possible with AveDesk (filecount for folders, CPU/RAM stats under the computer Icon).
But as always, there's room for improvements :D

I described points 2 and 3 a little incomplete. With AveDesk, you could hide ALL icons on the desktop, not only the default Windows desktop icons. Instead, you could make AveDesk replace these icons automatically. When, for example, I downloaded a new file, a new AveDesk Icon was placed on my desktop, the 'original' file was hidden (but still accessible through the Explorer). Why all of this? Well, to have more control over the look of the icons (choosing the font, the alignment of the text, showing the file size, etc.). This function was buggy and was one of the reasons for several crashes of AveDesk. I haven't used it in the end. Still I think it's something interesting to play with. Maybe someday you think about integrating something similar into Rainmeter.

Since this is a rather exotic thing, I have some more general question/suggestion. As you've already mentioned, with the new FreeDiskSpace beta, you can detect removable drives. I've created a skin for this and it worked quite good. Unfortunately, I noticed, that depending on the amount of devices plugged in, the drive letter can vary between G:,H:,I:, etc.
I could write a separate skin for every drive, but I want the drive icon to appear directly under the other (fixed) icons on my desktop. Is it possible to give G: position Y=0 and H: position Y=20 but when I remove G:, H: jumps up to Y=0? When I plug in I:, it should have position Y=40 and if I plug in G: again, H: and I: should jump down. Might sound confusing, does anybody know what I mean? :D
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Rainmeter as an Avedesk alternative

Post by MerlinTheRed »

You can position a meter depending on the value of a measure. The FreeDiskSpace measure lets you check if a drive is removed by setting Type=1 on it (see http://rainmeter.net/cms/Measures-FreeDiskSpace_beta). This should be all you need to position your meters accordingly. It could look something like this:

Code: Select all

[Removable1]
Measure=FreeDiskSpace
Type=1
Drive=G:
IfBelowValue=2
IfBelowAction=!HideMeter Icon1
IfAboveValue=1
IfAboveAction=!ShowMeter Icon1

[Removable2]
Measure=FreeDiskSpace
Type=1
Drive=H:
IfBelowValue=2
IfBelowAction=!HideMeter Icon2
IfAboveValue=1
IfAboveAction=!ShowMeter Icon2

[Removable3]
Measure=FreeDiskSpace
Type=1
Drive=I:
IfBelowValue=2
IfBelowAction=!HideMeter Icon3
IfAboveValue=1
IfAboveAction=!ShowMeter Icon3

[Icon1]
Meter=Image
X=0
Y=0
W=32
H=32
LefMouseUpAction=["G:\"]

[Icon2]
Meter=Image
X=0
Y=(0 + ([Removable1:] > 1 ? [Icon1:H] : 0))
W=32
H=32
LefMouseUpAction=["H:\"]
DynamicVariables=1

[Icon3]
Meter=Image
X=0
Y=(0 + ([Removable1:] > 1 ? [Icon1:H] : 0) + ([Removable2:] > 1 ? [Icon2:H] : 0))
W=32
H=32
LefMouseUpAction=["I:\"]
DynamicVariables=1

I've not tested this, but the idea is that you add the height that is occupied by one of the previous icons to the y value of the icon, only if the previous icon is shown (e.g. the drive is not removed).
Another way to do this is with the "R" setting of the position, which will ignore hidden meters, so if a meter is positioned relative to the previous one using Y=R, and the previous one gets hidden, the meter will use the position relative to the meter before that. I didn't use this approach here because it is less flexible and not as clear to understand when looking at the code.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
the_barber
Posts: 4
Joined: March 5th, 2011, 5:06 pm

Re: Rainmeter as an Avedesk alternative

Post by the_barber »

Thanks Merlin, works just fine. There's only one little thing that bothers me:
When I plug out the USB Stick, the label and the icon disappear but when I try this with an external HDD ('fixed'), the icon won't disappear while the label vanishes.
I guess it's the same problem as written here: http://rainmeter.net/forum/viewtopic.php?f=14&t=6000
I've tried the 'ugly' solution and it works but it causes too much load. It's been a while since that post, maybe there's another way now?

I can go around by reloading the skin manually, but that's no real solution.