Skip to content
Gregory Cabral De Los Santos edited this page Nov 18, 2024 · 3 revisions

Decky Script Runner Plugin Guide

The Decky Script Runner is an essential tool for Steam Deck users who want to harness the power of scripting for automation, development, and multi-tasking. This guide will walk you through the main features of the plugin, explaining how to make the most of its capabilities.


Script Launcher

The script launcher allows you to execute multiple scripts simultaneously. Imagine running several web servers or automating multiple tasks at once—the possibilities are endless. By default, the plugin opens a console when a script is run, giving you instant feedback and control. However, the script continues running in the background even after the console is closed. If you'd prefer a quieter experience, you can disable the automatic console opening through the plugin settings.


SideLoader

image

The SideLoader is an integrated tool that makes script management simple and accessible. It features a built-in editor powered by Monaco, where you can create, edit, and test your scripts with ease. You can launch the SideLoader by clicking the button in the plugin menu. Once opened, the SideLoader displays the IP address where it’s running, so you can access it from a browser on any device connected to the same network, that address is also provided on a QR code next to the alert. This functionality ensures you have a seamless environment for script development without leaving your Steam Deck.


Editing Scripts

image

Scripts can be fully managed using the SideLoader, but if you prefer working directly with files, the plugin provides a symlink to the /home/deck/decky-scripts folder. You can create or upload scripts to this directory manually. To ensure your scripts are displayed properly in the plugin’s interface, you should include a metadata template at the top of your scripts. This template organizes information such as the script title, description, version, and root requirements, giving users a clear understanding of what the script does.

Here’s the recommended metadata format:

----------metadata---------  
title: Install Nodejs  
description: Installs Nodejs on your steam deck  
image:  
author: Gr3  
version: 1.0.0  
root: true  
----------metadata---------  

Root Scripts

image

Some scripts require root access to perform advanced tasks, such as managing system files or configuring system-level settings. These are referred to as root scripts. Scripts labeled as root in their metadata are carefully tested within the community to ensure they don’t cause harm to your Steam Deck. However, it’s important to exercise caution when running scripts from unknown sources, as they could potentially damage your system. If you’re developing a root script, simply set the root property to true in the metadata to allow the plugin to execute it with the necessary permissions.


Supported Languages

The Decky Script Runner supports several popular scripting languages, giving you flexibility in how you automate and develop on your Steam Deck.

  • JavaScript (Node.js)
  • Python
  • Lua
  • Perl
  • PHP
  • Bash
  • Ruby

If your preferred language isn’t listed, you can submit a feature request by opening an issue, and it may be included in a future update.


Community Scripts

image

The plugin encourages collaboration by allowing users to share their scripts with the community. To contribute, simply follow the instructions provided in the community repository. Once approved, your scripts will appear in the community scripts section of the plugin, making them instantly available to other users. This is a great way to share your ideas and contribute to the Decky Script Runner ecosystem.


Log Viewer

image

Debugging and monitoring scripts is made easy with the built-in log viewer. This tool allows you to view real-time output from your scripts, helping you identify issues and track their performance. The log viewer is also available within the SideLoader, ensuring you have all the tools you need to develop and manage scripts efficiently.