The Mansusmriti,Hinduism, one of the Books on Code of Conduct covers a wide range of subjects, from Naminf the individual to even Toilet practices.
Toilet Rules, Manusmriti.
A Brahmana who desires energy must not look at a woman who applies collyrium to her eyes, has anointed or uncovered herself or brings forth a child.
Let him not eat, dressed with one garment only; let him not bathe naked; let him not void urine on a road, on ashes, or in a cow-pen.
Nor on ploughed land, in water, on an altar of bricks, on a mountain, on the ruins of a temple, nor ever on an ant-hill.
Nor in holes inhabited by living creatures, nor while he walks or stands, nor on reaching the bank of a river, nor on the top of a mountain.
Let him never void faeces or urine, facing the wind, or a fire, or looking towards a Brahmana, the sun, water, or cows.
He may ease himself, having covered the ground with sticks, clods, leaves, grass, and the like, restraining his speech, keeping himself pure, wrapping up his body, and covering his head.
Let him void faeces and urine, in the daytime turning to the north, at night turning towards the south, during the two twilights in the same position as by day.
In the shade or in darkness a Brahmana may, both by day and night, do it, assuming any position he pleases; likewise when his life is in danger.
The intellect of a man who voids urine against a fire, the sun, the moon, in water, against a Brahmana, a cow, or the wind, perishes.
Let him not blow a fire with his mouth; let him not look at a naked woman; let him not throw any impure substance into the fire, and let him not warm his feet at it.
Let him not place fire under a bed or the like; nor step over it, nor place it when he sleeps at the foot-end of his bed; let him not torment living creatures.
Let him not eat, nor travel, nor sleep during the twilight; let him not scratch the ground; let him not take off his garland.
Let him not throw urine or faeces into the water, nor saliva, nor clothes defiled by impure substances, nor any other impurity, nor blood, nor poisonous things.
Manusmṛti Chapter 4, verses 44-56
Far from his dwelling let him remove urine and ordure, far let him remove the water used for washing his feet, and far the remnants of food and the water from his bath.
Early in the morning only let him void faeces, decorate his body, bathe, clean his teeth, apply collyrium to his eyes, and worship the gods.
Manusmṛti Chapter 4, verses 151-152.
All those cavities of the body which lie above the navel are pure, but those which are below the navel are impure, as well as excretions that fall from the body.
Flies, drops of water, a shadow, a cow, a horse, the rays of the sun, dust, earth, the wind, and fire one must know to be pure to the touch.
In order to clean the organs by which urine and faeces are ejected, earth and water must be used, as they may be required, likewise in removing the remaining ones among twelve impurities of the body.
Oily exudation, semen, blood, the fatty substance of the brain, urine, faeces, the mucus of the nose, ear-wax, phlegm, tears, the rheum of the eyes, and sweat are the twelve impurities of human bodies.
He who desires to be pure must clean the penis by one application of earth and then water, the anus by applying earth and then water three times, the left hand alone by applying it ten times, and both hands by applying it seven times.
Such is the purification ordained for householders; it shall be double for students, treble for hermits, but quadruple for ascetics.
When he has voided urine or faeces, let him, after sipping water, sprinkle the cavities, likewise when he is going to recite the Veda, and always before he takes food.
Manusmṛti Chapter 4, verses 132-138