I found on Awesome wiki has a tip for move mouse to corner. But I hope to improve it, when mouse has not been used by a time. Then Awesome do it automatically.
Here is my code. But "Question", I do not know how to detect mouse's status,
and
how long mouse has been slept.
local saftCoords = {x=1920, y=1080}
local moveMouseOnStartup = true -- tell Awesome to do this at startup
local function moveMouse(x_co, y_co)
mouse.coords({ x=x_co, y=y_co })
end
if moveMouseOnStartup then
moveMouse(saftCoords.x, saftCoords.y)
end
-- TODO when mouse sleep for a time, then automatically move to corner.
mousetimer = timer({ timeout = 60*1 })
mousetimer:add_signal("timeout", function()
moveMouse(saftCoords.x, saftCoords.y)
end)
mousetimer:start()
--
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone}
IRC(freenode): stardiviner \\ Twitter: @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
signature.asc
Description: Digital signature
