#!/bin/env sh # INIT printf "$$" > ~/.cache/pidofbar sec=0 update_memory () { memory="$(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")" } update_time () { time="$(date "+[  %a %d %b ] [  %I:%M %P ]")" } update_bat () { # you might need to change the path depending on your device read -r bat_status