Skip to content

Instantly share code, notes, and snippets.

@alok
Created November 18, 2016 12:45
Show Gist options
  • Save alok/12cd04586b735c5ee89a484ad89eaa2c to your computer and use it in GitHub Desktop.
Save alok/12cd04586b735c5ee89a484ad89eaa2c to your computer and use it in GitHub Desktop.
hs.window.animationDuration = 0
hs.hotkey.bind({"shift", "ctrl"}, "T", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2
f.h = max.h
win:setFrame(f)
end)
hs.hotkey.bind({"shift", "ctrl"}, "N", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x + (max.w / 2)
f.y = max.y
f.w = max.w / 2
f.h = max.h
win:setFrame(f)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment