Skip to content

Your first script

Go from an empty folder to your first overlay in a few minutes. This example uses the standard Lua API and needs no FFI.

Each script lives in its own folder inside ~/.config/nvidia/scripts/. Create a folder named hello and add a file named exactly main.lua:

~/.config/nvidia/scripts/
└── hello/
└── main.lua

You can also create and edit scripts from Aqua’s Scripts workspace. The workspace reference covers file tabs, metadata and auto-run.

Paste this into main.lua:

main.lua
function on_draw()
aqua.draw.text(24, 24, "yo, what's up?", { 1, 1, 1 }, { size = 18 })
end

on_draw is called once per frame. The text starts at screen position 24, 24. { 1, 1, 1 } is white: red, green and blue, each from 0 to 1.

Open Scripts, select hello, save the file and press Run. Your text appears in the top-left corner of the screen. Use Stop to unload the script, and check CONSOLE / PROBLEMS if an error appears.

To start it automatically with the active profile, enable Run on load. Leave Enable FFI off for this example.

An optional script.json next to main.lua gives your script a title in the list:

script.json
{
"title": "Hello, Aqua",
"description": "My first overlay.",
"author": "Your name",
"version": "1.0"
}