Created
April 21, 2020 18:02
-
-
Save ecoleman/9332081763df97c6902bc3dbc8940a02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phoenix.set({ | |
daemon: true, | |
openAtLogin: true, | |
}) | |
var left = new Key('left', ['cmd', 'alt'], function() { | |
const parent = Screen.main().visibleFrame() | |
const win = Window.focused() | |
const frame = win.screen().frame() | |
win.setFrame({ | |
x: frame.x, | |
y: frame.y, | |
width: parent.width/2, | |
height: parent.height, | |
}) | |
}) | |
// | |
// Left Side, 2/3rds of screen | |
// | |
var left_23rds = new Key('left', ['shift', 'cmd', 'alt'], function() { | |
const parent = Screen.main().visibleFrame() | |
const win = Window.focused() | |
const frame = win.screen().frame() | |
win.setFrame({ | |
x: frame.x, | |
y: frame.y, | |
width: (parent.width/3) * 2, | |
height: parent.height, | |
}) | |
}) | |
var right = new Key('right', ['cmd', 'alt'], function() { | |
const parent = Screen.main().visibleFrame() | |
const win = Window.focused() | |
const frame = win.screen().frame() | |
win.setFrame({ | |
x: frame.x + (frame.width/2), | |
y: frame.y, | |
width: parent.width/2, | |
height: parent.height, | |
}) | |
}) | |
// | |
// Right Side, 2/3rds of screen | |
// | |
var right_23rds = new Key('right', ['shift', 'cmd', 'alt'], function() { | |
const parent = Screen.main().visibleFrame() | |
const win = Window.focused() | |
const frame = win.screen().frame() | |
win.setFrame({ | |
x: frame.x + (frame.width/3), | |
y: frame.y, | |
width: (parent.width/3) * 2, | |
height: parent.height, | |
}) | |
}) | |
var full = new Key('down', ['ctrl', 'cmd', 'alt'], function() { | |
const parent = Screen.main().visibleFrame() | |
const win = Window.focused() | |
const frame = win.screen().frame() | |
win.setFrame({ | |
x: frame.x, | |
y: frame.y, | |
width: parent.width, | |
height: parent.height, | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment