-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChromeTabToNewWindow.lua
32 lines (23 loc) · 982 Bytes
/
ChromeTabToNewWindow.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
--- Generated by Luanalysis
--- Created by muescha.
--- DateTime: 05.08.22 12:02
---
fileInfo()
bindHotkey(to("Google Chrome"), hyper, "t", keyInfo("Open Tab in new Window"),function()
local app = hs.application.frontmostApplication()
local menuItemName = "Tab in ein neues Fenster verschieben"
-- local menuItem = app:findMenuItem(menuItemName)
-- print(menuItem)
-- if menuItem.isEnabled then
--print(hs.inspect.inspect(app:getMenuItems()))
--hs.application.frontmostApplication():getMenuItems(function(result)
-- print(string.format("result: %s", hs.inspect(result)))
--end)
--hs.application.get("Safari"):selectMenuItem({"Safari", "About Safari"})
--hs.application.get("Safari"):selectMenuItem({"Safari", "Über Safari"})
local currentFrame = hs.window.focusedWindow():frame()
app:selectMenuItem(menuItemName)
hs.window.focusedWindow():setFrame(currentFrame)
hs.alert.show("Move tab to new window")
end )