Overcoming distractions in meditation as per the Tripitaka? According to the Tripitaka how do you overcome distractions in meditation. Distractions can be including but not limited to:


Wondering mind
Pains
Hindrances
Defilements arising in the mind
etc.
Tibetan Buddhism recognizes following "five faults" arising during meditation:


laziness (kausidya) -- with 3 subtypes;
forgetting the instructions (avavadasammosa) -- aka losing the object of observation;
non-identification of laxity (laya, with three subtypes) or excitement (auddhataya, with three subtypes);
non-application of antidotes (anabhisamskara);
overapplication of antidotes (abhisamskara).


1. Laziness

The 3 types of laziness are:


a sense of inferiority -- a thought like "I cannot possibly succeed at this meditation";
attachment to worldly activities -- the tendency to do something else instead;
the lack of impulse -- absence of motivation to meditate now.


The actual solution for laziness is pliancy (prasrabdhi) -- physical and mental serviceability that comes with experience in meditation. Until that is attained, the antidotes for laziness are faith (sraddha) , aspiration (chanda), and exertion (vyayama), which can be generated through contemplation of the advantages of meditation -- and disadvantages of being driven around by random impulses.

2. Forgetting the instructions

This is when the object of observation suddenly disappears. We lose the object of observation because the mind is greatly distracted.

The antidote for this is called tight mindfulness (smrti). This has three parts to it:


familiarity -- the object of observation must be familiar; the mind should be accustomed to it;
tightness -- continuous (with no gaps) apprehension of the aspects of the object;
non-distraction -- not letting the other objects displace the object of observation.


As soon as the object of observation is lost, we should immediately, with tight grasp, bring it back.

3. Non-identification of Laxity or Excitement

If we don't notice laxity or excitement, we can't apply a corresponding antidote. As a result, laxity or excitement grows until it gets out of control, and then we lose the object of observation.

The antidote for non-identification is introspection (samprajanya). We must occasionally (not continuously!) analyze the mind to see if laxity or excitement has arisen, and which subtype thereof.

The three subtypes of laxity (aka sluggishness) are:


Lethargy (styana) -- heaviness of mind and body, a state of being close to sleep;
Coarse laxity (audarika) -- a case of having stability of mind but not clarity of the mind; This is often caused by the mind becoming too withdrawn inside;
Subtle laxity (suksma) -- a case of having stability and clarity but not intensity of clarity. This is caused by the weakness in the mode of apprehension of the aspects of the object of observation.


The three subtypes of excitement (aka unruliness) are:


Negative scattering -- remembering a disagreeable object;
Coarse excitement -- remembering a pleasant object;
Subtle excitement -- having a part of the mind come under the influence of discursive thinking (vikalpa), and as a result, having an (agreeable) object about to appear to the mind, "like water moving under ice". This is caused by the mind being a little too tight.


4. Non-application of antidotes

After introspection has discovered laxity or excitement and identified its subtype, to not apply an appropriate antidote would lead to laxity or excitement getting out of control and subsequent loss of the object of observation.

The antidote for non-application is ... application (surprise!!!) of antidotes:


The antidote for Subtle Laxity is tightening the mode of apprehension of the aspects of the object of observation. 
The antidote for Coarse Laxity is expanding the scope of observation.
The antidote for Lethargy is giving up the object of observation and engaging in invigorating the mind: contemplating topics that get one happy and inspired about practicing Dharma, reducing the amount of food taken prior to meditation; cooling the body down; washing the face with cold water; moving to a higher elevation; moving to place with a wider view; yelping loudly; resting if needed.
The antidote for Subtle Excitement is loosening the mode of apprehension a little.
The antidote for Coarse Excitement is reducing the mind elation by leaving the object of observation and contemplating negative topics that will get the mind sobered (if mind is distracted towards a pleasant object) or by following the inhalations and exhalations (if mind is captured by discursive thinking).
The antidote for Negative scattering is contemplating topics that generate maitri (Pali metta) -- the mind of loving-kindness.


5. Overapplication of antidotes

This means mistakenly applying antidotes for laxity or excitement when meditation is already going well, and/or after laxity or excitement have been eliminated. This also means overapplying an antidote for laxity (which will generate excitement) or overapplying an antidote for excitement (which will generate laxity).

An antidote to overapplication is called desisting from application, also known as equanimity.

........
Source: Meditative States in Tibetan Buddhism by Lati Rinpoche