Bhagavad Gita

ತತ್ತ್ವವಿತ್ತು ಮಹಾಬಾಹೋ ಗುಣಕರ್ಮವಿಭಾಗಯೋಃ।
ಗುಣಾ ಗುಣೇಷು ವರ್ತಂತ ಇತಿ ಮತ್ವಾ ನ ಸಜ್ಜತೇ॥೨೮॥
tattvavittu mahābāho guṇakarmavibhāgayoḥ|
guṇā guṇeṣu vartaṃta iti matvā na sajjate||28||

Gist of the sloka:
O Mahavira, one who is aware of the senses and karmas because of right knowledge, will never try to get attached to the karmas or its results.
One who has understood the right knowledge [tattva or truth], would need to be aware of the senses, their qualities [gunas] and types of karmas. The gunas are classified as Satvic, Rajasic and Tamasic. The actions derived out of these gunas are based on the relative actions of these gunas. Actions we are doing now could be due to the past attachment with these gunas. We should therefore be detached from our own actions and view it as a spectator. This is related to the science of the mind psychology. Lord Krishna calls Arjuna as “Maha bhaho”, meaning mighty armed Arjuna. It also means [mahat mahatithi - maha bhaho], one who has in his heart/and understands the universal truth. Lord is implying that Arjuna with this knowledge should proceed forward.
We should analyze the action with the knowledge, that these actions have the influence of the 3 gunas and understand their influences in greater detail. We will slowly realize the influences and the impact it has on the actions. We then will slowly lose the ownership of the actions and realize the truth. The truth being: actions, the 3 gunas influencing the actions, our swabhava are influenced by the 3 gunas and the influence of the Lord [right knowledge] over all others. All these influences the actions.
Jadha [non-living] has only action. Soul/living being has both action and desire intentional action. Lord has - independent intentional action. This is the categorization of karmas. One who can differentiate between guna and karma segregation knows the truth. With this knowledge, one will be removed of his ego – ‘I did it’.
For a real example, watch a person speaking with wisdom/knowledge. When he speaks, he speaks with deep meaning. The words do not flow out irresponsibly. The words have to come out of his mouth, which have to be formed first, he has to have the right emotions attached to the words, those emotions first have to originate in his mind. Which means from the from the mind, the emotions travel, form the right words and those words come out of the mouth. If the emotions have to come out as words, space and air is required.
Only when all these actions happen smoothly, does the person able to speak and make the impression and pass on the info. The question is who is the inspiration behind the mind, to able to make out the emotions and words? What if there are no words coming out to indicate the right message? What if the mind does not act properly at that instance? Where is our real involvement in all this? When we realize how dependent [or just an instrument] we are and how little we can control, the ego disappears. Only then, can we live with everything but not get attached to anything.
The senses [3 gunas] work according to the swabhava. Lord who is bright knowledge [gyana ananda Swaroopa – Happiness filled body of knowledge], controls the gunas in the body/action. When we realize this truth, our ego of feeling mine and I disappear. We realize, that in the immense universe, we are just a sand particle and our actions are insignificant – attachment disappears.