App for Windows to toggle G-Sync via command line.
Run the app in terminal for usage instruction, but in case you're lazy:
Usage example:
gsynctoggle status prints the current G-Sync status. See below for possible status values.
gsynctoggle 0 turns the G-Sync off.
gsynctoggle 1 turns the G-Sync on for fullscreen mode only.
gsynctoggle 2 turns the G-Sync on for fullscreen and windowed modes.
Thank you Sunshine project for a nice example on how to use the NvAPI!