Trying to get this to work
This commit is contained in:
parent
167260211a
commit
eeff7ec82d
2 changed files with 4 additions and 4 deletions
|
@ -47,11 +47,11 @@ main()
|
||||||
# Handle left icon configuration
|
# Handle left icon configuration
|
||||||
case $show_left_icon in
|
case $show_left_icon in
|
||||||
smiley)
|
smiley)
|
||||||
left_icon="☺";;
|
left_icon="☺ ";;
|
||||||
session)
|
session)
|
||||||
left_icon="#S";;
|
left_icon="#S ";;
|
||||||
window)
|
window)
|
||||||
left_icon="#W";;
|
left_icon="#W ";;
|
||||||
*)
|
*)
|
||||||
left_icon=$show_left_icon;;
|
left_icon=$show_left_icon;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -18,7 +18,7 @@ get_percent()
|
||||||
|
|
||||||
Darwin)
|
Darwin)
|
||||||
# percent=$(ps -A -o %mem | awk '{mem += $1} END {print mem}')
|
# 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')
|
total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | awk '{print $2 $3}' | sed 's/used//g')
|
||||||
echo $used_mem/$total_mem\G\B
|
echo $used_mem/$total_mem\G\B
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue