focus_target(3)
π focus_target β scheduler bias era π
okay so this is focus_target(3) from the Arcan Lua API, and she is short but she is important, fr fr. The whole point? Specify a frameserver the scheduler should try and bias. Letβs get into it, bestie π«Ά
πΈ NAME πΈ
focus_target β Specify a frameserver the scheduler should try and bias.
β¨ SYNOPSIS β¨
It starts with nil, and then the two call shapes are literally:
nil
focus_target( vid:WORLDID )
focus_target( vid:fsrv )
π DESCRIPTION π
okay so some synchronisation strategies might rely on a focus target β like some external process they want to bias in favor of. In those cases, the specific target has to be pointed out by the scripts themselves, because the engine has no direct way of knowing which client has visual focus and so on. Thatβs the whole vibe check this function handles: you use it to set such an object β¨
Calling the function without any arguments, or with WORLDID as the argument, will remove any existing bias focus. And if the frameserver expires, the bias will be removed implicitly β no extra cleanup arc, itβs just gone, periodt.
π NOTES π
- 1 β calling the function with a
vidthat is not tied to a frameserver is a terminal state transition. Highkey important: thatβs a terminal state transition, not a cute little oopsie. Treat it with respect π
π¦ EXAMPLE π¦
The example goes exactly like this, because code is sacred:
function focus_target0()
local vid =
target_alloc("test", function(source, status)
end);
if (valid_vid(vid, TYPE_FRAMESERVER)) then
focus_target(vid);
end
end
π SEE ALSO π
targetcontrol
okay bye bestie β that was focus_target(3) from the Arcan Lua API, dated October 2026 πβ¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms