 // 1    width                   => 2
 // 2    id, width
 // 3    width, scale            => 6
-// 4    width, height           => 5
+// 4    width, height           => 
 // 5    id, width, height
 // 6    id, width, scale
 // 7    id, width, height, scale

    init() {
        // actual number of display
        var displayCount32:UInt32 = 0
        var displayIDs = [CGDirectDisplayID](arrayLiteral: 0)

        guard CGGetOnlineDisplayList(UInt32(maxDisplays), &displayIDs, &displayCount32) == .success else {
            print("Error on getting online display List.")
            return
        }
        displayCount = Int( displayCount32 )
        dm = displayIDs.map { DisplayManager($0) }
    }

    // print a list of all displays

}

func sleepDisplay() {
    let r = IORegistryEntryFromPath(kIOMainPortDefault, strdup("IOService:/IOResources/IODisplayWrangler"))

    IORegistryEntrySetCFProperty(r, ("IORequestIdle" as CFString), kCFBooleanTrue)
    IOObjectRelease(r)
