You are actually speaking of two different things here.
There is a parable where Jesus speaks of 2 sons. One says that he will obey his father and the other says he won't. But the one who says he will...doesn't and the one who said he won't...does.
So which one is deemed righteous?
The same goes for being a Christian but
not being humble...as opposed to being a non-believer but
being humble. Which is deemed as righteous by God? The one who ACTS with righteousness. Righteous is as righteous does. Just look at the parable of the Pharisee and the Publican. The one who thought he was righteous wasn't. And the one who thought he wasn't was.
So it is with
righteousness...which is a moving target. It's about what we do with our actions.
So then we are known by our ACTIONS whether we are righteous or not. We will all be judged on this.
Then there is another higher form of righteousness which is by faith.
The righteousness of God. In THAT righteousness...which is not our own...His righteousness causes us to do things we would never be able to do on our own. His grace empowers us. So then the polarity is reversed. It is no longer we...but Christ.