move project to ~/.config/i3blocks/
This commit is contained in:
14
ram
Executable file
14
ram
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
gawk '
|
||||
/^MemFree:/ {
|
||||
mfg=$2/1024^2
|
||||
mfm=$2/1024
|
||||
} END {
|
||||
if (mfg > 2) { printf("%.1f GB", mfg) }
|
||||
else { printf( "%.0f MB", mfm ) }
|
||||
print("\n")
|
||||
if (mfg > 4) { print("#04B431\n") }
|
||||
else if (mfg > 2) { print("#FFA500\n") }
|
||||
else { print("#FF0000\n") }
|
||||
}' /proc/meminfo
|
||||
|
Reference in New Issue
Block a user