How do you keep a workout routine?

Couldn't write a text without going on a rambling spree, TL;DR: at the bottom

I don't really have advice, per se, to give you, just my personal experience and maybe it'll give you a bit more insight how it could work out for you too.
First month is easily the toughest. You don't want to go, brain keeps telling you that tomorrow is another day, might even feel shit physically from the last training session. I got literally no advice for that (well going with a friend have helped some but I wouldn't know more about that), I just forced through the first month and seeked motivation from videos and from own personal goals. However personally I don't believe motivation to be a "endgame keyfactor"; routine is what keeps you going in the end.
Once I got to the gym (getting there was the hardest part for me) it wasn't really enjoyable in the beginning. I was weak, it was boring as hell, I wasn't really doing any "real" progress in the first month. If you haven't done any researching on programs beforehand, it can be extremely demotivational just going through the equipment without any real sense of what you're supposed to be doing and how much.
Thank god it all got better after that. Finding the right workout program is also something that I'd put weight on. My current program makes sure that I workout regularly and thoroughly but an average training session only takes me 45 minutes. A program gives me real sense of progress. I still have the mindset of "gotta do this fast and just get out of here" but the desire to do better than last time, to get stronger, to progress overrides the temptation to just half ass things and go home. Between sets I browse reddit on my phone, it fills the "dead time" between sets. The actual moves aren't really boring anymore, I want to focus on them so they'll be more effective and I'll progress better.
At this point I'd say it's mostly routine and actually feeling good physically and mentally after a successful workout. If you get over the first month and STILL feel like it isn't your thing maybe it just isn't. As everyone has said there a plenty of other, more engaging alternatives to working out at the gym.

TL;DR: first month is the hardest, just need to power through it; relatively short sessions (45min a day); good program to give you a sense of progression, something to wait for everyday; reddit&music during rests; motivation is passing, routine is lasting; eventually you'll want to do these things in order to progress and to get stronger, if you don't then maybe it's just not your thing, good things don't come easy but everyone should definitely find at least some joy in the things they're doing.

/r/ADHD Thread