C: Space Meter

By Jagfire on Jul 29, 2008

Calculates the percentage of free space you have on your C: drive, and displays it in a text-based meter to the active channel. If you're not in a channel, it'll echo it. Type /spacemeter

alias spacemeter {
  var %' = $calc($bytes($disk(c:).free) / $bytes($disk(c:).size)), %i = $calc(%' * 100), %o = $+($round(%i,2),$chr(37))
  var %bars = $round($calc(%' * 10),0), %notbars = $calc(10 - %bars), %m = c: space meter $+($chr(91),$chr(2),$chr(3),4,$str(>,%bars),$chr(15),$chr(3),14,$iif(%notbars != 0,$str(>,%notbars),$chr(15)),$chr(15),$chr(93)) %o free
  if ($active ischan) say %m
  else echo -a %m
}
Sign in to comment.
napa182   -  Feb 13, 2009

why lame? but they should maybe used a input to pick what drive to check cuz not everyone uses C:

 Respond  
baseballer790   -  Feb 13, 2009

Lame

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.