#!/bin/bash while true; do printf ' %s, %sGB \n' \ "$(date '+%H:%M:%S')" \ "$(printf 'scale=2; %s/1024/1024' "$(cat /proc/meminfo | grep -i 'MemAvailable.*kB' | grep -oE '[01-9]+')" | bc)" sleep 1 done | ./top_right_indicator