nat geo wallpaper #1

Closed
slestak opened this Issue Feb 21, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@slestak

slestak commented Feb 21, 2011

Love this script. 2 suggestions though

I needed to add parens to the math expression for calculating disk free before it worked for me.

Without the parens, this is what I got:
gb_total == 96.1224822998
gb_free == 56.2757339478
Not enough free space! (-4% free)

I added parens around 1st expression
percen_free = (gb_total - gb_free) / gb_free * 100

Second thing is I keep my /home and / on 2 partitions. The space check is on / and the files are stored in ~. I hardcoded mine to work (checking space in /home/steve) but this could easily be more general.

I may tinker with this and get it working for win7.

@shuckins

This comment has been minimized.

Show comment Hide comment
@shuckins

shuckins Feb 21, 2011

Owner

Glad you liked it! It was an itch I have been needing to scratch :-)

On the first issue: yeah looks like I just did that wrong. It should be: " (gb_total - gb_free) / gb_total * 100". I was missing parens and should have been dividing by gb_total. Fixed in commit 839bb58.

On your second issue: commit 74fa9e8 fixes this, now only checking for free space in picture_dir. So you can just use that and change picture_dir = "/home/steve" (or "~" actually, I set it up to handle that).

I would love a working non-Linux version! Please send to me if you go that route and I'll add to the blog post.

Owner

shuckins commented Feb 21, 2011

Glad you liked it! It was an itch I have been needing to scratch :-)

On the first issue: yeah looks like I just did that wrong. It should be: " (gb_total - gb_free) / gb_total * 100". I was missing parens and should have been dividing by gb_total. Fixed in commit 839bb58.

On your second issue: commit 74fa9e8 fixes this, now only checking for free space in picture_dir. So you can just use that and change picture_dir = "/home/steve" (or "~" actually, I set it up to handle that).

I would love a working non-Linux version! Please send to me if you go that route and I'll add to the blog post.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment