In systemd 196, I added the option of 'lock' to the lid switch, though it appears as though F18 has 195 and probably won't get that upgrade (though a backport should be minimal work/maintenence; I'd certainly love to see it in RHEL7 at least). This causes all sessions to receive a 'lock' signal. If there's a signal for when the lid closes as well, the listener in the DEs could check if they're on AC and suspend if so. I'm writing a minimal Python daemon which does what I want (with flexibility); haven't worked on it for a while though.