shedali
7/18/2016 - 3:40 PM

hammerspoon dev mode

hammerspoon dev mode

function expand_devtools()
  hs.application.launchOrFocus("Google Chrome")
  hs.application.launchOrFocus("Terminal")
  hs.application.launchOrFocus("Sublime Text")
  local laptopScreen = "iMac"
    local windowLayout = {
        {"Google Chrome",  nil, iMac, {x=0, y=0, w=0.5, h=1},nil, nil},
        {"Sublime Text",  nil, iMac, {x=0.5, y=0, w=0.5, h=0.6},nil, nil},
        {"Terminal",  nil, iMac, {x=0.5, y=0.6, w=0.5, h=0.4},nil, nil},
        -- {"App Name",  "Window Name", "Screen Name", hs.layout.left50,nil, nil}
        -- {x=0, y=0, w=0.5, h=1}
    }
    hs.layout.apply(windowLayout)
end

hs.hotkey.bind({"cmd", "alt", "ctrl"}, "d", function()
 expand_devtools()
end)