To set the action when the laptop lid is closed, simply enter the following commandline:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-MODE-action “ACTION”where you replace MODE with either ac or battery depending on which mode you're setting, and replace ACTION with blank, suspend, hibernate or shutdown