I’ve had a PowerKey under my desk for years. It’s simply a powerstrip with a USB connector that you can plug into your Mac (I’m assuming it work with Windows as well). Then I can setup keyboard shortcuts to toggle power on and off to individual outlets. I use this to turn on lights in my office, power up backup hard drives and control other devices. I use it every day to turn the lights on at night… I have three desk lamps that are all set to go on with a single key stroke. You can also manually turn individual outlets on or off using buttons on the powerstrip.