54

Disk Capacity Meter

Posted in System by d13t 939 days ago

A minimal slightly glowing circle to indicate the used disk space. Works best on dark(ish) wallpapers.

Download at: http://cl.ly/ANko

Made at the same time as jramer's Circle Indicator and heavily inspired (and adapted) from midnighttokerkate's Circle Volume Indicator.

Readme file included.


Comments

User Avatar
ohodoodee 933 days ago
good
User Avatar
Valde 931 days ago
I just can't get the shell working. What I'm doing wrong? I type in command:

`osascript /Users/valtteriseppala/DiskCapasityMeter.DCM.scpt/` and it sows me the red light and won't work. What should I do?
User Avatar
matt 931 days ago
I think you have a typo in the word capacity.
User Avatar
pelle285 242 days ago
the / after .scpt is wrong to, you only need " at the end.
User Avatar
aditihansen 918 days ago
The circle shows up when I installed the scripts but the light indicator isn't showing up. I made sure I don't have any typos or anything. any help?
User Avatar
itsjared 916 days ago
@aditihansen

I had the same problem. When I ran the script I noticed it was putting an additional "/" before the .png file. Evidently when I plugged in the file path I used a trailing "/". Just open the script with apple script editor and run it and see what the output path is.

I thought you might need to rename the disk somehow but turns out not to be the case.
User Avatar
aditihansen 905 days ago
@itsjared, Oh awesome, I didn't see that, Thanks!
User Avatar
valiant66 915 days ago
Hi. I like your images better than the volume ones by midnighttokerkate that jramer uses.

I've gotten your script to work for my boot drive, but I've got five drives I'd like to monitor.

How can I adapt your script to work with multiple drives?

Thanks.
User Avatar
robinkeunen 903 days ago
Thanks, I love it!
User Avatar
cla_j 898 days ago
Hi! I'm not exactly a AppleScript pro, so maybe I make something wrong. Once I set the path in the script, it takes a lot of time to save it. Is it normal? Is there something else I have to replace in the script?

Thanks..
User Avatar
svenah 878 days ago
Thanks for the geeklet!

Here's my attempt to change your AppleScript into bash shell script. To use the bash shell script.

1. Edit the **disk1** to the disk name you want to monitor. The easiest way to find that out is to run `df` in a Terminal window and check the **Filesystem** column.

2. Save the shell script as DCM.sh in the same folder with the **temp.png** file and **img** subfolder.

3. The shell geeklet should be `source DCMP/DCM.sh` where **DCMP** is the path to the shell script.

**Edit:** Somehow the Markdown codes aren't cooperating with me, so I uploaded the sample DCM.sh to Droplr. Link: http://d.pr/tCsX
User Avatar
mugget 835 days ago
That's pretty cool - looks nice an minimal.

What would be the advantage of running it as a shell script? Sorry for asking, just that I've got it running and I'm really wondering if there's any benefit to spending more time tweaking it...
User Avatar
ChiCaked 756 days ago
Im trying to get this to work on my Network drive and have amended the following but I'm getting errors:

df -hl = df -h (to show network drive)

Disk0s2 = New%20Media (to grep the correct drive)

------------------------------------

on run

-- Set the path to the directory of the DiskCapacityMeter folder

-- For example: "/Users/name/Documents/GeekTool/DiskCapacityMeter/"

set pathName to "/Users/name/Documents/GeekTool/DiskCapacityMeter/"



-- df -h | grep 'New%20Media' | awk '{sub(/%/, "");print $5}'

-- Substitute % with ""

set usedSpace to (do shell script "df -h | grep 'New%20Media' | awk '{sub(/%/, \"\");print $5}'") as integer



-- Getting the rounded number

set theNumber to (round (usedSpace / 5)) * 5



-- Replacing the image

do shell script ("cp " & pathName & "/img/" & theNumber & ".png " & pathName & "/temp.png")

end run

------------------------------------

I'm ending up with the following error:

tell current application

do shell script "df -h | grep 'Shows' | awk '{sub(/%/, \"\");print $5}'"

--> "95%"

Result:

error "Can’t make \"95%\" into type integer." number -1700 from "95%" to integer

comparing it with the original mine is adding the % sign...

Can anyone help on this?

Thank you in advance!

ChiCaked!
User Avatar
Jffryalford 731 days ago
I really like this and was wondering if you could do it for other things like cpu usage, Ram, download/upload speed. and maybe have different colors too. There is one for ram i found but it doesnt seem to work and it seems the instructions are just copy and pasted from this one.
User Avatar
kistej 509 days ago
I support the idea....unfortunately the request seems to be was not taken :(
User Avatar
joev 652 days ago
Love this. have now based my whole desktop around a number of dials based on this (I'll share soon as I get a change to post)
User Avatar
chris_at_uo 644 days ago
I have used this geeklet to indicate used memory. The geeklet is included at:

http://www.macosxtips.co.uk/geeklets/collections/geeklets-with-backgrounds-for-each-one-modified-ntika-set/
User Avatar
RutgervD 559 days ago
I downloaded this one again, i failed to set it up on my other laptop. Now i bought a 15 inch retina. I still have the same problems in getting it to work properly.

My knowledge about the scripts on a mac is next to zero. I've managed to get the time and date and RAM status up and running again. anyway here's the problem. The circle is on the desktop already, that's all good. I cannot get the script to run which is included in the download. when i've set the path it sais syntax error. there's no acces to that path. Here's the quote: "/Users/rutgervandoorn/Documents/Geektool/DiskCapacityMeter/" kan niet worden ingesteld op "PATH". Toegang niet toegestaan. This is in dutch but it says cannot be rooted to a "PATH". Access Denied. Any help with this please!
User Avatar
pelle285 242 days ago
remove the / at the end of DiscCapacityMeter and all works.
User Avatar
ccolegate 402 days ago
can someone upload a video? or make this into a geaklet or do something plz? the text isn't very easy to follow :)
User Avatar
ejleon 293 days ago
Really nice Circle Indicator!

Is there any way to show this for Time Machine Drive back up loading progress. What I mean is can I show what Time Machine is backing up (System Preference Loading progress) using this circle as a progress meter?

Thank you EJ

I also agree with uploading a video or geeklet to do this.
User Avatar
ejleon 291 days ago
Can I use this to show TM's back up in progress?

Can I use any script to show amount of MBs left or time remaining for TM's back up?
User Avatar
pelle285 242 days ago
I even use this one to show info on 32GB USB drive.

The original shel script looks like this:

on run

-- Set the path to the directory of the DiskCapacityMeter folder

-- For example: "/Users/YOURUSERNAME/Documents/GeekTool/DiskCapacityMeter/"

set pathName to "/Users/henrypelle/Downloads/Geektool/DiskCapacityMeter"



-- df -hl | grep 'disk0s2' | awk '{sub(/%/, "");print $5}'

-- Substitute % with ""

set usedSpace to (do shell script "df -hl | grep 'disk0s2' | awk '{sub(/%/, \"\");print $5}'") as integer



-- Getting the rounded number

set theNumber to (round (usedSpace / 5)) * 5



-- Replacing the image

do shell script ("cp " & pathName & "/img/" & theNumber & ".png " & pathName & "/temp.png")

end run

I changed it to:

on run

-- Set the path to the directory of the DiskCapacityMeter folder

-- For example: "/Users/YOURUSERNAME/Documents/GeekTool/DiskCapacityMeter/"

set pathName to "/Users/henrypelle/Downloads/Geektool/DiskCapacityMeter2"



-- df -hl | grep '32GB USB' | awk '{sub(/%/, "");print $5}'

-- Substitute % with ""

set usedSpace to (do shell script "df -hl | grep '32GB USB' | awk '{sub(/%/, \"\");print $5}'") as integer



-- Getting the rounded number

set theNumber to (round (usedSpace / 5)) * 5



-- Replacing the image

do shell script ("cp " & pathName & "/img/" & theNumber & ".png " & pathName & "/temp.png")

end run

To show intel about the USB drive.

After you made your changes to the script run it in apple's script editor and save the changes in order to keep it working.

I hope this will help some people to get things to work/show up the way they like.
User Avatar
dkgiles 55 days ago
I had success getting the original script to run perfectly, until I enabled FileVault (Mavericks).

Any clue if there is a way around this other than disabling FileVault?

Log in to comment or register here.