         return String(
             format:"%@%5d x %4d @ %dx @ %dHz",
             leadingString,
-            di.width,
-            di.height,
-            di.scale,
-            di.frequency
+            di.width, di.height,
+            di.scale, di.frequency
         )
     }
     

   -r 800      shorthand for -s 0 800 2
   -d          toggle macOS Dark Mode
   -sl         sleep display
"""

func main () {
    let screens = Screens()
    let darkMode = DarkMode()

    let input = UserInput(CommandLine.arguments)
    
    // dipatch functions
    switch input.intention {
    case .listDisplays:
        screens.listDisplays()
        
    case let .listModes(displayIndex):
        guard displayIndex < screens.displayCount else {
            print("Display index( \(displayIndex) ) not found. \(help_display_list)")
            return
        }
        
        print("Supported Modes for Display \(displayIndex):")
        screens.listModes(displayIndex)

    case .setMode:
        screens.set(with:DisplayUserSetting( input.arguments ))
    case .darkMode:
        darkMode.toggle()
    case .sleepDisplay:
        sleepDisplay()
    default:
        print(help_msg)
    }
}


        }
    }

    static func ~= (lhs: Self, rhs: DisplayUserSetting) -> Bool {
        return rhs ~= lhs
    }
}
