Stop working just for money. You can earn money in many different ways. Chances are that you can earn a lot more money for the work you do now at another workplace.
Any job you take should give you something money can’t buy directly. It could be technological know-how, a great team, perks like working from home or the freedom to work on open source projects as part of your work day.
You need to know why you work at any workplace. Why this company and not any other? These reasons will help you to focus on what is important to you. They will help you avoid all that is not in alignment with your vision. You will stop doing “busy work” and reacting to things that do not concern you in the least. Your list of reasons guides you through it all.
At some point the reasons that kept you at a workplace will no longer exist. Your vision of what you want can change. When this happens it is a clear indication that it is time to move on. Your list of reasons will take any emotion out of the decision. It will also clarify whether to stay at a company or whether to leave.
Have these reasons clearly in your mind as you go about your work everyday.