mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
34647e4e75
Signed-off-by: Julien Danjou <julien@danjou.info>
30 lines
910 B
Lua
30 lines
910 B
Lua
---------------------------------------------------------------------------
|
|
-- @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.
|
|
-- @param Screen number.
|
|
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
|