-
Notifications
You must be signed in to change notification settings - Fork 128
Upgrade from 2.x to 2.2
Kasper Hirvikoski edited this page Apr 15, 2018
·
6 revisions
Follow this guide to upgrade your configuration from 2.x to the new API in 2.2. Sorry for the trouble!
start -> didLaunch
Phoenix.bind(String key, Array<String> modifiers, Function callback) -> new Key(String key, Array<String> modifiers, Function callback)
Phoenix.on(String event, Function callback) -> new Event(String event, Function callback)
Phoenix.after(double interval, Function callback) -> new Timer(double interval, boolean repeats, Function callback)
Phoenix.every(double interval, Function callback) -> new Timer(double interval, boolean repeats, Function callback)
Also, you can use the new managed handlers to let Phoenix manage the references to the handlers for you (i.e. you will not need to explicitly keep references to your handlers).
Screen.mainScreen() -> Screen.main()
Screen.screens() -> Screen.all()
#visibleWindows() -> #windows({ visible: true })
Space.activeSpace() -> Space.active()
Space.spaces() -> Space.all()
#visibleWindows() -> #windows({ visible: true })
Mouse.moveTo(...) -> Mouse.move(...)
App.focusedApp() -> App.focused()
App.runningApps() -> App.all()
#visibleWindows() -> #windows({ visible: true })
#forceTerminate() -> #terminate({ force: true })
Window.focusedWindow() -> Window.focused()
Window.windows() -> Window.all()
Window.visibleWindows() -> Window.all({ visible: true })
Window.visibleWindowsInOrder() -> Window.recent()
#otherWindowsOnSameScreen() -> #others({ screen: window.screen() })
#otherWindowsOnAllScreens() -> #others()
#windowsToWest() -> #neighbours('west') or #neighbors('west')
#windowsToEast() -> #neighbours('east') or #neighbors('east')
#windowsToNorth() -> #neighbours('north') or #neighbors('north')
#windowsToSouth() -> #neighbours('south') or #neighbors('south')
#focusClosestWindowInWest() -> #focusClosestNeighbour('west') or #focusClosestNeighbor('west')
#focusClosestWindowInEast() -> #focusClosestNeighbour('east') or #focusClosestNeighbor('east')
#focusClosestWindowInNorth() -> #focusClosestNeighbour('north') or #focusClosestNeighbor('north')
#focusClosestWindowInSouth() -> #focusClosestNeighbour('south') or #focusClosestNeighbor('south')
Command.run(String path, Array arguments) -> Task.run(String path, Array arguments, Function callback)