-- hs.osascript.javascript([[ -- (function() { -- var app = Application('Code'); -- app.includeStandardAdditions = true -- // app.activate() -- for (win of chrome.windows()) { -- win.activeTabIndex = 1; -- win.activate() -- } -- })(); -- ]]) -- local wf = hs.window.filter -- wf_timewaster = wf.new(false):setAppFilter('Code', { -- allowTitles = 'docker' -- }) -- wf_timewaster:activate() -- local r = table.pack(hs.application.find("Code")) -- print("TABLE", r) -- local code = hs.application.find("Code") -- hs.application.enableSpotlightForNameSearches(true) -- print(code:allWindows()) -- hs.window.allWindows() -- local wins = hs.window.visibleWindows() -- local codeWindowFilter = hs.window.filter.new():setAppFilter('Code') -- print(codeWindowFilter) -- local wins = wf.new(false):setAppFilter('Code', { -- allowTitles = 'system' -- }) -- win:setFullScreen(true) -- local runningApp = hs.application.get('Code') -- print("ra:", runningApp) -- local windows = hs.fnutils.filter(runningApp:allWindows(), function(win) -- print("w", win) -- return win:isStandard() -- end) -- local windows = hs.window.orderedWindows() -- local wins = hs.application.get('docker'):allWindows() -- hs.fnutils.map(hs.window.filter.new():getWindows(), function(win) -- if win ~= hs.window.focusedWindow() then -- return { -- text = win:title(), -- subText = win:application():title(), -- image = hs.image.imageFromAppBundle(win:application():bundleID()), -- id = win:id() -- } -- end -- print("win title:", win:title()) -- print("app title:", win:application():title()) -- end) -- local wins = hs.window.allWindows() -- local wf = hs.window.filter -- local f = wf.new(false):setAppFilter('Code', { -- -- fullscreen = true, -- -- allowScreens = '-1,0', -- currentSpace = false -- }):getWindows() -- local f = wf.new(function(w) -- return w:frame().area > 3000000 -- end) -- local apps = {wf.new(false):setAppFilter('Code')} -- for _, w in pairs(apps) do -- wins = w:allWindows() -- for _, w in pairs(wins) do -- print("w:", w) -- end -- end -- local sc = hs.screen.allScreens() -- for _, s in pairs(sc) do -- print("all screen:", s) -- end -- wf_terminal = hs.window.filter.new {'Code', 'Code'} -- for _, win in ipairs(wf_terminal:getWindows()) do -- print("win:", win) -- if win ~= nil and string.find(win:title(), "docker") then -- moveWindowToLeftHalf(win) -- win:focus() -- end -- end -- local frontmostApplication = hs.application.frontmostApplication() -- if frontmostApplication and frontmostApplication:name() == "Code" then -- print(frontmostApplication) -- end -- local wins = hs.application.get('Code'):allWindows() -- local wins = hs.window.filter('Code'):getWindows() -- first = wins[1]:id() -- second = wins[2]:id() -- print("first:", first) -- print("second:", second) -- local result = hs.fnutils.each(wins, function(data) -- print("Data:", data) -- end) -- for i, v in pairs(hs.window.invisibleWindows()) do -- print(i, v) -- end -- print("result: ", result) -- hs.hints.windowHints() -- hs.osascript.javascript([[ -- (function() { -- var app = Application('Code'); -- app.includeStandardAdditions = true -- app.activate() -- app.displayDialog("dialogText", { -- buttons: ["Don't Continue", "Continue"], -- defaultButton: "Continue", -- cancelButton: "Don't Continue" -- }) -- })(); -- ]])
관련 문서
Plugin Backlinks: 아무 것도 없습니다.