Thank you very much, the DisplaySwitch.exe hint is exactly what I was looking for.
So far these are the only two use cases I came up with, but I will look into running parametrized processes if I need something new.
For the one button for sleep and WoL, you can write a custom remote action to toggle between sending sleep or wake depending on a bool variable, and then map your widget button to that action.
Is there a way to send Windows actions, eg. change presentation mode from "Extend" to "Computer only" or unlock workstation that is password protected?
I have managed this with sending keyboard strokes, but this isn't a very nice solution I think.
Just a note on @reconnnn answer:
If you want your IR commands to be sent even if your server is down (PC off) you need to place them in the layout.
Oops! Looks like something went wrong!
You may only upload PNG, JPG, or GIF files ()