Skip to content

Instantly share code, notes, and snippets.

@palaniraja
Created October 10, 2023 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palaniraja/8e62c090775e01ca1d18f423c66ab047 to your computer and use it in GitHub Desktop.
Save palaniraja/8e62c090775e01ca1d18f423c66ab047 to your computer and use it in GitHub Desktop.
hammerspoon right half on this monitor
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "space", function()
rightHalf()
end)
function rightHalf()
screen = hs.screen.mainScreen()
screenName = screen:name()
win = hs.window.focusedWindow()
app = win:application():name()
frame = win:frame()
-- code right half - 2023-10-10 11:57:31: App: Code
-- Frame: xhs.geometry.rect(1531.0,25.0,1477.0,1667.0)
frame.x = 1530
frame.y = 25
frame.w = 1477
frame.h = 1667
win:setFrame(frame)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment