Trying to get this to work

This commit is contained in:
Ethan Edwards 2020-06-07 19:19:52 -04:00
parent 167260211a
commit eeff7ec82d
2 changed files with 4 additions and 4 deletions

View file

@ -47,11 +47,11 @@ main()
# Handle left icon configuration
case $show_left_icon in
smiley)
left_icon="☺";;
left_icon="☺ ";;
session)
left_icon="#S";;
left_icon="#S ";;
window)
left_icon="#W";;
left_icon="#W ";;
*)
left_icon=$show_left_icon;;
esac

View file

@ -18,7 +18,7 @@ get_percent()
Darwin)
# percent=$(ps -A -o %mem | awk '{mem += $1} END {print mem}')
used_mem=$(top -l 1 -s 0 | grep PhysMem | awk '{mem += $2} END {print mem}')
used_mem=$(top -l 1 -s 0 | grep PhysMem | awk '{print $2 $3}' | sed 's/used//g')
total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | awk '{print $2 $3}' | sed 's/used//g')
echo $used_mem/$total_mem\G\B
;;