Skip to content

Instantly share code, notes, and snippets.

@marmakoide
Last active January 1, 2021 12:43
Show Gist options
  • Save marmakoide/65152e6370cba90a35c8b5086c9af994 to your computer and use it in GitHub Desktop.
Save marmakoide/65152e6370cba90a35c8b5086c9af994 to your computer and use it in GitHub Desktop.
Shell script that generates a string describing RAM usage, to use with dwmblocks and Font Awesome
#!/bin/sh
icon=""
mem_str=$(free -h | awk '/^Mem/ { print $3 "/" $2 }' | sed s/i//g)
echo $icon $mem_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment