Skip to Content

Tile

A tile script controls what its tile displays on the Stash home screen.

Configuration Format

tiles: - name: your-fancy-script interval: 600 title: 'Awesome Tile' content: 'This is Super Cool' icon: 'theatermasks.circle.fill' # or https://stash.ws/amazing.png backgroundColor: '#663399' script-providers: your-fancy-script: url: https://your-fancy-script.com/your-fancy-script.js interval: 86400

Parameters:

  • argument: Optional, the parameter for script execution, of type string.
  • title: Optional, default title before the script runs for the first time.
  • content: Optional, default content before the script runs for the first time.
  • icon: Optional, default icon before the script runs for the first time. The icon supports SF Symbols or a remote image starting with http.
  • backgroundColor: Optional, default background color before the script runs for the first time.
  • url: Optional, default redirect URL before the script runs for the first time.
  • collapsed groups the tile with the third-party service checks when set to true.

The configuration supplies the initial values. The script can update the tile’s display fields and URL by calling $done(object).

⚠️

For more details on SF Symbols, please refer to Apple Developer .

Syntax and Interface

Please refer to JavaScript Script Syntax and Interface.

Example

$httpClient.get('https://api.my-ip.io/ip', function (error, response, data) { $done({ title: 'Current IP Address', content: data, backgroundColor: '#663399', icon: 'network', }) })

$done(value)

⚠️

For all scripts, the method $done(value) must be called at the end to release resources.

In a tile script, pass any of these optional fields to $done(object) to update the tile.

  • title sets the tile title.
  • content sets the text the tile displays.
  • icon sets the tile icon.
  • backgroundColor sets the tile background color.
  • url sets the URL to open when the user taps the tile.

Omit a field to keep its current value. Call $done({}) to keep all current values.

Collapsed Tile

Set collapsed: true to show the tile in the list of third-party service checks. A collapsed tile can show whether a service is available on the current network.

When you long-press a proxy to view its details, Stash sends the collapsed tile’s $httpClient requests through that proxy. Use the result to check whether the proxy can reach the service.

Last updated on