I want to avoid having to re-enter my password after every few minutes of inactivity when my laptop is in a safe environment (e.g. docked - it's a ThinkPad with a Thunderbolt dock - or connected to my home wifi). How do I approach that problem?
Is there some generic utility for this or does it have to be done differently for every definition of "safe environment"? I looked for relevant PAM modules but could not find anything, and not sure if that's even the right approach (ideally I'd want the window manager to not lock in the first place, not circumwent passwords for login). How to disable lock screen based on which WIFI network I'm connected to? is relevant but the answers given there (hook into network state changes and disable/reenable using a lock screen depending on what network we have just switched to) seems fragile and insecure - I'd imagine the ideal solution to leave the lock screen enabled but perform some kind of check before locking, and delay locking for another N minutes if that check succeeded.