Exactly. That was off the top of my head. How do you test for -1 in sh? Because that's what the percentage is when in flight mode.
#!/bin/sh percent=$(qdbus --system com.nokia.csd /com/nokia/csd/csnet com.nokia.csd.CSNet.SignalStrength.SignalPercent) if [[ $percent -ge 25 ]] then printf "{{yellow}}{{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}}" else if [[ $percent -le 24 ]] then printf "{{red}}{{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}}" else if [[$percent -eq -1]] then echo -n "{{red}}flightmode on" fi fi fi