When trying to get full custody based on living conditions it's important to realize what the determination by the court is based on. The courts consider what is in the best interest of the child. In order to attain full custody you will first need to demonstrate that it is in the child's best interest to live with you. That will of course include living conditions, demonstrating that you provide the best environment along with best parenting skills. Nevertheless, in most cases courts grant some form of shared or joint custody. Even if you gain physical custody of the child (meaning the child lives with you but the other spouse has visitation rights) it is much more difficult to get sole or full custody where the other parent has no rights to see the child. In order for the court to make this kind of decision you will have to demonstrate that any time spent with the other parent will actually be detrimental to your child.
If you have been the stay-at-home parent during the time you were married, making your job the care and welfare of the children at home, more than likely you will be granted physical custody at the time of the divorce. The logic is that you are already used to caring for the children and the court's mindset is that maintaining this situation as "normal" is in the best interest of the children. As long as you were the stay at home parent, this should be easy enough to prove. In order to gain full custody meaning no visitation or other rights being given to the other parent you will have to demonstrate that there are dangers - physical or emotional - for the child when with the other parent. These would have to be proven by showing a dangerous lifestyle, excessive drinking or smoking, gambling, negligent care of the child, exposure to dangers in the house, etc.