     }
 
     func set(with setting: DisplayUserSetting) {
+        print("setting", setting)
         if let di = displayInfo.first(where: { setting == $0 }) {
             if di.modeID != modeID { _set(di) }
         } else {

        
        let mode = CGDisplayCopyDisplayMode(displayID)!
        self.modeID = mode.ioDisplayModeID

        
        var option:CFDictionary?
        let subList = ( CGDisplayCopyAllDisplayModes(displayID, option) as! Array )
            .filter { ($0 as CGDisplayMode).isUsableForDesktopGUI() }
        
        option = [kCGDisplayShowDuplicateLowResolutionModes:kCFBooleanTrue] as CFDictionary
        let modeList = ( CGDisplayCopyAllDisplayModes(displayID, option) as! Array )
            .filter { ($0 as CGDisplayMode).isUsableForDesktopGUI() }
                
        self.modes = modeList.filter { !subList.contains($0) }

        // Array.unique is requires converting to DisplayInfo first
        self.displayInfo = Array(Set(

    
    private func _set(_ di:DisplayInfo) {
        let mode:CGDisplayMode = di.modeRef
        print(mode.width, mode.pixelWidth, di.scale, di.width, mode)

        print("Setting display mode")

