statusbar: fixed bug in memory script

master
TiynGER 6 days ago
parent e7db336362
commit ec50c1347b

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
icon="^b#282828^^c#dfdfdf^  ^d^ " icon="^b#282828^^c#dfdfdf^  ^d^ "
total=$(free -h | awk '/^Mem:/ {print $3/$2}') total=$(free --mebi | awk '/^Mem:/ {print $3/$2}')
percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\.//g' | sed -e 's/^0//g') | tr ' ' ' ') percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\.//g' | sed -e 's/^0//g') | tr ' ' ' ')
if [ $percent -gt 75 ] if [ $percent -gt 75 ]

Loading…
Cancel
Save