SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hs.window.animationDuration = 0
  2. units = {
  3.   r30    = { x = 0.700, y = 0.000, w = 0.300, h = 1.000 },
  4.   r50    = { x = 0.500, y = 0.000, w = 0.500, h = 1.000 },
  5.   r70    = { x = 0.300, y = 0.000, w = 0.700, h = 1.000 },
  6.   l30    = { x = 0.000, y = 0.000, w = 0.300, h = 1.000 },
  7.   l50    = { x = 0.000, y = 0.000, w = 0.500, h = 1.000 },
  8.   l70    = { x = 0.000, y = 0.000, w = 0.700, h = 1.000 },
  9.   top50  = { x = 0.000, y = 0.000, w = 1.000, h = 0.500 },
  10.   bot50  = { x = 0.000, y = 0.500, w = 1.000, h = 0.500 },
  11.   max    = { x = 0.025, y = 0.025, w = 0.950, h = 0.950 },
  12.   center = { x = 0.125, y = 0.125, w = 0.750, h = 0.750 }
  13. }
  14.  
  15. mash = { 'ctrl', 'alt', 'cmd' }
  16. hs.hotkey.bind(mash, 'right', function() hs.window.focusedWindow():move(units.r50, nil, true) end)
  17. hs.hotkey.bind(mash, 'left', function() hs.window.focusedWindow():move(units.l50, nil, true) end)
  18. hs.hotkey.bind(mash, 'up', function() hs.window.focusedWindow():move(units.top50, nil, true) end)
  19. hs.hotkey.bind(mash, 'down', function() hs.window.focusedWindow():move(units.bot50, nil, true) end)
  20. hs.hotkey.bind(mash, 'l', function() hs.window.focusedWindow():move(units.r30, nil, true) end)
  21. hs.hotkey.bind(mash, 'h', function() hs.window.focusedWindow():move(units.l70, nil, true) end)
  22. hs.hotkey.bind(mash, 'm', function() hs.window.focusedWindow():move(units.max, nil, true) end)
  23. hs.hotkey.bind(mash, 'c', function() hs.window.focusedWindow():move(units.center, nil, true) end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top