diff --git a/modules/disksize b/modules/disksize new file mode 100755 index 0000000..cbbfff8 --- /dev/null +++ b/modules/disksize @@ -0,0 +1,16 @@ +#!/bin/bash + +# Prints out the total disk memory and the availeable memory + +PREFIX=' ' + +get_disk() +{ + TOTAL_SIZE=$( df -h --total / | tail -1 | awk {'printf $2'}) + USED_SIZE=$(df -h --total / | tail -1 | awk {'printf $3'}) + PERCENTAGE=$(df -h --total / | tail -1 | awk {'printf $5'}) + + echo "$PREFIX$USED_SIZE/$TOTAL_SIZE ($PERCENTAGE)" +} + +get_disk diff --git a/modules/ram b/modules/ram old mode 100644 new mode 100755