Four years looks like a permanent custody. Hopeful she is on record trying to appeal the decision. Does she have a visitation schedule, and hopeful she keeps it regular. Some courts consider hours of day and over nights as the custodial parent. It takes time, and if the kids are young enough, she may want to inch more into their weekly and daily lives and keep written organized record. Tricks to this, is be available for babysitting, transportation, school projects, Sign kids up for team sports, sign up as the coach, volunteer to the kids school, activities, field trips, tutor, PTA, Help your kids to make many friends over at your house,etc. Try to get more over-nights, and weekends, holidays, Bdays, summer vacations, or the entire summer, Then expand it slowly so you bring them back Monday after school vs Sunday. Pick them up Thursday vs Friday for every weekend, or share weekends but still get them Thursday to Friday. Inch in slowly, keep records, and be friendly to ex. After a year or so, you will be the majority custodial parent, but have to be this status for 6 months. Then bring custody hearing to Judge with a good att.