Repository navigation
Sys API
sys is the Lua-side bridge wrapper. It sends commands to the host Python bridge and returns plain text responses.
sys is loaded automatically at boot when /bin/sys.lua exists.
Manual load:
dofile("/bin/sys.lua")Sends a raw command string to the Python bridge.
Returns:
-
truewhen the request was posted -
falseif the bridge is not reachable
Example:
sys.send("ping")Reads the last response from the Python bridge.
Returns:
- response text, or
-
nilif no response is waiting
Sends a command and waits for a response.
-
msgis the command string -
timeoutis optional, default10seconds
Returns:
- response text, or
nil, "no response from python scripts"
Example:
local data, err = sys.execute("taskbar status")Returns the last response text received from the bridge.
Reads a file through the bridge.
Writes text to a file.
Checks whether a path exists.
Lists the contents of a directory.
Reads a file and returns a Lua array of lines.
Copies a file or directory.
Moves a file or directory.
Copies to the destination and replaces the target if it already exists.
Deletes a file or directory.
Creates a directory.
Runs a host-side program path through the bridge.
Downloads a file from the repository or a URL to the host filesystem.
Hides the Windows taskbar and blocks the Windows keys while hidden.
Shows the Windows taskbar and restores the Windows keys.
Toggles between hidden and visible taskbar state.
Returns hidden or visible.
If you run sys with arguments, it sends the arguments directly to the bridge:
sys taskbar status
sys download pkg/execute/execute.lua /bin/execute.lua
If you run sys with no arguments, it prints the command list.