I have my laptop set to never suspend when plugged in, and to suspend after a period of time when on battery; this is the way I'd like to keep it.
I regularly switch between using my laptop and desktop, so sometimes my laptop sits plugged in but unused for a period of time. If I intend to use the laptop at my workbench that's no problem, but sometimes I want to unplug the laptop and take it with me to go work somewhere else. However, if it's been sitting idle long enough, I will either get a notification similar to this:
or if it's been long enough, the laptop will go right into suspend mode before I can react.
I'm literally picking up my laptop to use it, and would rather it not go into suspend immediately upon unplugging. Is there any setting I can change so that the inactivity timer restarts when unplugging my laptop? Failing that, is there any sort of workaround for this, such as some script that can be triggered by power management upon unplugging, that emulates some sort of activity to reset the timer?
EDIT 2021-09-17T18:21Z
I've attached a screenshot of my current power settings. This is how I'd like them to stay:
The problem is, if my laptop has been idle while plugged in for 29 minutes, then I unplug it, pick it up, walk into the living room, and sit down, it goes to sleep on me because it now thinks it's been idle for 30 minutes. I'd somehow like it to interpret connecting/disconnecting DC power as "activity", such that it would only suspend if I didn't touch the laptop for 30 minutes after unplugging it.