How to get 60 FPS 2560x1440 resolution on AOC U2868 in macOS

I wrote this one line script because I was unable to put my AOC monitor back into 60 frames per second mode after enabling 4k.

macOS display preferences make dang near impossible to achieve. First just type in cscreen at the terminal to get the ID of your monitor, in my case 78ca19c6:

DisplayID Index Depth Width Height Refresh
78ca19c6 1 32 2560 1440 60
use -h to display all usage options
➜ ~

Then issue the command again, this time with the monitor unique ID and the parameters:

cscreen -d 32 -x 2560 -y 1440 -r 60 -i 78ca19c6
➜ ~

Swap 78ca19c6 for the value of your own monitor.

This will give you the best 60 FPS display performance AFAIk, the resolution known as 2560 x 1440 (QHD/WQHD - Wide Quad High Definition)

Official product page in my part of the world: