Alfred doesn't honor the "Reopen windows when logging back in" option. This workflow gets around it.
By default, this workflow executes the "commands" by automatically going through the dialogs but if you hold down `Cmd`, you get to manually cancel or accept the confirmation dialog. You can use that confirmation dialog to change the "Reopen windows when logging back in" option.
You'll want to disable the equivalent commands that come with Alfred:
Alfred Preferences > Features > System
There are 2 different hotkey triggers. Red hotkey triggers give you the confirmation dialog while the Green hotkey triggers don't.
Workflow is made for Alfred 3.
System commands included:
- Shutdown
- Restart
- Logout
- Sleep