awful.client: add tiled()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d7f92fdf9f
commit
bf7bae8082
|
@ -7,7 +7,6 @@
|
|||
-- Grab environment we need
|
||||
local hooks = require("awful.hooks")
|
||||
local util = require("awful.util")
|
||||
local layout = require("awful.layout")
|
||||
local tag = require("awful.tag")
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
|
@ -186,6 +185,21 @@ function visible(screen)
|
|||
return vcls
|
||||
end
|
||||
|
||||
--- Get visible and tiled clients
|
||||
-- @param screen The screen number, or nil for all screens.
|
||||
-- @return A tabl with all visible and tiled clients.
|
||||
function tiled(screen)
|
||||
local clients = visible(screen)
|
||||
local tclients = {}
|
||||
-- Remove floating clients
|
||||
for k, c in pairs(clients) do
|
||||
if not c.floating then
|
||||
table.insert(tclients, c)
|
||||
end
|
||||
end
|
||||
return tclients
|
||||
end
|
||||
|
||||
--- Get a client by its relative index to the focused window.
|
||||
-- @usage Set i to 1 to get next, -1 to get previous.
|
||||
-- @param i The index.
|
||||
|
|
Loading…
Reference in New Issue