You can file a divorce petition and establish custody. Until there's a court order for custody, both parents have equal legal custody rights in their children. Once a case is filed, a specific award must be made. There are two related issues to child custody: legal custody, and physical custody.
Legal custody refers to decision-making authority over a child. A parent with legal custody decides where a child goes to school and what religion they observe, makes medical decisions for the child, and so on. Parents can agree to joint legal custody, sharing this authority, but a court will not order joint custody unless the parents agree to it.
Physical custody, or parenting time, refers to where a child lives. Each custody case ends with a parenting plan describing where the child or children stay. These plans can be as specific or general as the parents need. The parents are free to deviate from the plan if they agree to do so, but the plan is there for when they can't agree. The harder it is for two parents to agree on these issues, the more important it is that the plan be clear and specific.
Usually, a parent who has legal custody of a child also has more parenting time, but this is not required. Parents can share equal parenting time while one has legal custody; or parents can share joint legal custody while one of them has physical custody most of the time.
Under Oregon law, decisions about legal and physical custody are made according to the best interests of the children. Obviously that's quite vague. But the law sets forth a few standards for determining the best interests of the children:
One principle is that the children should remain with the parent who spent most time with them before -- the "primary custodial parent." In this case, it sounds like you both have equal claims here. The law also presumes that it is in the best interests of the children to have an ongoing relationship and continuing contact with both of their parents. If the court must decide which parent is awarded primary legal and physical custody, it is more likely to grant it to the parent who has shown that they will encourage an ongoing relationship between the children and the other parent. Parents should not try to keep their children away from each other, unless one parent has clearly been abusing the children.
Oregon law explicitly does not consider the lifestyle choices of each parent in child custody decisions, except as it affects the welfare of the children. Judges do not want to hear parents attacking each other in court; the focus is on the children, not on each person's faults. That said, a parent's refusal to work with the other parent, or to mind the children's safety from things like cigarette smoke, will not look good to a court.
Another common means to figure out the best interests of children in a custody case is to order a professional custody evaluation. In this process, a social worker will interview the parents and the children, observe them interacting with each other, maybe visit both parents' homes, and make a recommendation to the Court. Judges follow these recommendations almost all the time. The problem is that these evaluations can be fairly expensive: $1,200 for court-appointed evaluators; $3,000 or more for a private evaluation, which is rather more thorough. Parents are typically asked to pay equally for these costs, or to pay in proportion to their incomes.
You should consult with an attorney if you're going through a divorce. You can call the Oregon State Bar for a free referral at 503-684-3763.