2008-09-29 16:49:18 +02:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
|
|
-- @copyright 2008 Julien Danjou
|
|
|
|
-- @release @AWESOME_VERSION@
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- Grab environment we need
|
|
|
|
local capi =
|
|
|
|
{
|
|
|
|
mouse = mouse,
|
|
|
|
screen = screen,
|
|
|
|
client = client
|
|
|
|
}
|
|
|
|
local util = require("awful.util")
|
|
|
|
local client = require("awful.client")
|
|
|
|
|
|
|
|
--- Screen module for awful
|
|
|
|
module("awful.screen")
|
|
|
|
|
|
|
|
--- Give the focus to a screen, and move pointer.
|
2008-11-04 21:09:35 +01:00
|
|
|
-- @param i Relative screen number.
|
2008-09-29 16:49:18 +02:00
|
|
|
function focus(i)
|
|
|
|
local s = util.cycle(capi.screen.count(), capi.mouse.screen + i)
|
|
|
|
local c = client.focus.history.get(s, 0)
|
|
|
|
if c then capi.client.focus = c end
|
|
|
|
-- Move the mouse on the screen
|
|
|
|
capi.mouse.screen = s
|
|
|
|
end
|
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|