If you are using a laptop, you are going to have a lot more options than most people. Since your PC has battery backup built right in, you can simply tell it to turn off when external power is lost. When you want to shut it off, unplug the power (or flip the switch) and you're golden!