React native and some screen stuff

parent f234206f
......@@ -13,6 +13,7 @@ end)
-- https://github.com/Hammerspoon/hammerspoon/issues/235
local hotkey = require "hs.hotkey"
local window = require "hs.window"
-- local screen = require "hs.screen"
local spaces = require "hs._asm.undocumented.spaces"
function getGoodFocusedWindow(nofull)
......@@ -70,7 +71,21 @@ function moveWindowOneSpace(dir)
flashScreen(screen) -- Shouldn't get here, so no space found
end
-- function removeSpace()
-- local spaceUuid = spaces.activeSpace()
-- local currentScreen = hs.screen.mainScreen()
-- -- local userSpaces=spaces.layout()[uuid]
-- -- spaces.removeSpace(uuid)
-- error(currentScreen.id, 0)
-- end
hotkey.bind(hyper, "L",nil,
function() moveWindowOneSpace("right",true) end)
function() moveWindowOneSpace("right") end)
hotkey.bind(hyper, "H",nil,
function() moveWindowOneSpace("left",true) end)
function() moveWindowOneSpace("left") end)
hotkey.bind(hyper, "N", nil,
function() spaces.createSpace() end)
-- hotkey.bind(hyper, "X", nil,
-- function() removeSpace() end)
......@@ -49,3 +49,13 @@ require('SelfSpoons/WifiWatcher')
-- Reload automatically
require('SelfSpoons/Reloader')
-- React native reload JS
hs.hotkey.bind(placid, 'R', function()
os.execute('/Users/peter/Library/Android/sdk/platform-tools/adb shell input text "RR"')
end)
-- React native show dev menu
hs.hotkey.bind(hyper, 'R', function()
os.execute('/Users/peter/Library/Android/sdk/platform-tools/adb shell input keyevent 82')
end)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment