Script Environment Variables

December 23, 2024 ยท View on GitHub

This document outlines the environment variables used in the Nata script, detailing their purpose and data types. You can use these variables within your recipes script.

Table of Contents

Environment Variables

Window Matching Rule

Variable NameTypeDescription
ACTIVE_WIN_CLASSStringClass of the currently active window.
ACTIVE_WIN_TITLEStringTitle of the currently active window.
LAYER_NAMEStringName of the layer for the matched window rule.

Config

Variable NameTypeDescription
CONFIG_FILEStringPath to the configuration file.
RECIPES_SCRIPTStringPath to the recipes script.
CONFIG_DATAStringConfiguration data from the config file, stored in JSON format.
BASE_LAYERStringBase layer name.
INTERVALNumberTime interval in seconds.
IPStringIP address.
PORTIntegerPort number.

Config Window Rules

Variable NameTypeDescription
WIN_RULES_COUNTIntegerNumber of window rules defined in the config file.
WIN_CLASSESArrayList of window classes from the config file.
WIN_TITLESArrayList of window titles from the config file.
LAYER_NAMESArrayList of layer names from the config file.

Accessing Environment Variables

To access an environment variable in your recipes script, use the $ prefix followed by the variable name:

echo "Active window title: $ACTIVE_WIN_TITLE"

If you find something unclear or have suggestions for improvements, we welcome your contributions! Please feel free to report any bugs or issues you encounter.