-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzephyros.rb
37 lines (32 loc) · 908 Bytes
/
zephyros.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require '/Applications/Zephyros.app/Contents/Resources/libs/zephyros.rb'
# push to top half of screen
API.bind "UP", ["cmd", "ctrl", "alt"] do
win = API.focused_window
frame = win.screen.frame_without_dock_or_menu
frame.h /= 2
win.frame = frame
end
# push to bottom half of screen
API.bind "DOWN", ["cmd", "ctrl", "alt"] do
win = API.focused_window
frame = win.screen.frame_without_dock_or_menu
frame.h /= 2
frame.y = frame.y + frame.h
win.frame = frame
end
# push to bottom half of screen
API.bind "LEFT", ["cmd", "ctrl", "alt"] do
win = API.focused_window
frame = win.screen.frame_without_dock_or_menu
frame.w /= 2
win.frame = frame
end
# push to bottom half of screen
API.bind "RIGHT", ["cmd", "ctrl", "alt"] do
win = API.focused_window
frame = win.screen.frame_without_dock_or_menu
frame.w /= 2
frame.x = frame.x + frame.w
win.frame = frame
end
wait_on_callbacks