Personally, I'd take as much of the 4 weeks as possible to take things easy - the last thing you want to go through is a 2nd surgery to correct an issue from training too heavy too soon!
Trust me, you won't lose much by taking things easy for only a month so long as you keep your protein up, stay somewhat active (take some moderate walks, maybe do some light 8-10 lb. DB work for high reps 2-3x weekly for the sake of feeling like you're putting in work to maintain), but I wouldn't do anything such as static holds as they will definitely put strain on your core, the last place you'll want it after hernia surgery.
I'd suggest taking 1-2 weeks really light and just doing some walking, then maybe halfway through the recovery, do some really light general work like bodyweight squats (if permitted and they don't aggravate the injured area), bodyweight good mornings, light DB curls and triceps extensions, lateral raises, etc. just to keep yourself feeling sharp on training without putting yourself at risk.
Just keep the protein high, don't over-exert yourself, and it you'll find that the comeback after a month won't be that bad.
"A 'hardgainer' is merely someone who hasn't bothered to try enough different training methods to learn what is actually right for their own damned body." - anonymous