Discipline is a decision. That is all. You decide to goof off. Be responsible for making your decisions, and you will find a way towards better discipline. You could say that discipline is "recognition of having made a decision" ..
The human condition is such that, with respect to various things, what we are and what we know we should be are different, and sometimes quite distant from one another, and moving from the "are" to the "ought to be" is often a struggle.
I have learned some strategies over the years, but these strategies are not ones that everyone is willing to employ.
Share please!
Take this advice however you will. shrug