Switched to processing command-line arguments for setting the variables in main.swift.

This commit is contained in:
Pietro Gagliardi 2015-08-08 19:47:53 -04:00
parent c76584c3d2
commit 8ae6c9d02a
1 changed files with 9 additions and 1 deletions

View File

@ -35,7 +35,15 @@ class appDelegate : NSObject, NSApplicationDelegate {
}
func main() {
spaced = Process.arguments.count > 1
for arg in dropFirst(Process.arguments) {
if arg == "spaced" {
spaced = true
} else if arg == "horizontal" {
firstvert = false
} else {
fatalError("unrecognized option \(arg)")
}
}
var app = NSApplication.sharedApplication()
app.setActivationPolicy(NSApplicationActivationPolicy.Regular)