Well, swearing in front of the kids is not too serious an issue, but exposing the kids to conflict will be. You have to find a way to make your separation amicable if it is to go ahead because that is what is 100% best for the kids.
Before the court can intervene on any parenting matters, the affected parties have to attempt family dispute resolution to try and reach an agreement between themselves, but if it fails, then they can't pursue proceedings in court. Generally speaking, it's best to take advantage of family dispute resolution to try and negotiate a parenting plan for how the kids care arrangements will work once you're separated. Court proceedings are time-consuming, costly and stressful, plus they have the inevitable effect of turning parents against each other over a matter that they should be working together on.
If the court were to hear the matter, it would determine a parenting order based on what's in the best interests of the kids. It's usually held that it's in the best interests of the kids to have a meaningful relationship with both parents, regardless of their respective flaws or challenges, so unless there is unacceptable risk to the kids due to exposure to abuse, family violence or neglect, then the court will ordinarily order that the children spend time with both parents on a regular basis. Getting sole parental responsibility (or sole custody, as you say) is not an easy order to have made, so you probably don't need to worry about that yet, but it is advisable to get as much help as needed to appease the problems that exist at the moment.
Consider counselling focused on helping you both to co-parent, and organise a family dispute resolution conference so that care arrangements can be settled as early as possible.