# hs.window print("#start filter:") -- local theWindows = hs.window.filter.new() -- theWindows:setDefaultFilter{} -- theWindows:setSortOrder(hs.window.filter.sortByFocusedLast) theWindows = hs.window.filter.new():getWindows() -- theWindows = hs.window.filter.new(true):getWindows() -- theWindows:setSortOrder(hs.window.filter.sortByFocusedLast) function w_info(w) return w:title() .. w:application():name() end for i, v in ipairs(theWindows) do print(i, w_info(v)) end print("#end filter:" .. #theWindows)