7

RAM Meter 3

Posted in System by enochou 1599 days ago

Last updated: July 2, 2015

Description

This version is an update of Matt's RAM Meter, which fixes issues with Maverick and Yosemite. The update also increases customizability.

Set-up

Change the first line to match your system's total RAM in Megabytes. For example:

totalRAM=16000

means you have 16GB of RAM.

Customize

You can change the number of ticks and tick character in the second and third line. For example:

ticks=20
tickchar="•"

means your meter will have 20 dots in total. (Refer to screenshot).

By default, the border color is set to red (31). To change the color, find the following line:

#Border tick
echo "\033[1;31m$tickchar\033[0m\c"

and change the 31 to another number. To change the color of the unused memory ticks, find a similar line and change the 30 to another number.

For Coders

The used RAM in megabytes is defined as:

usedRAM=`top -l 1 | awk '/PhysMem/ {print $2}' | sed s/M// `

Geeklet files to download

Comments

User Avatar
hworang00 1413 days ago
Anyway you could make a CPU version that looks like this? and Battery?

Sorry completely new to coding so...

Log in to comment or register here.