Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AhmedSaadi0/NibrasShell/llms.txt

Use this file to discover all available pages before exploring further.

NibrasShell includes a collection of Python and Bash helper scripts that the shell invokes at runtime to gather system data, generate visuals, and talk to AI providers. All scripts live under config/quickshell/scripts/python/ and config/quickshell/scripts/, and every call goes through App.qml, which provides unified path resolution so scripts work regardless of where you have installed the shell.
You never call these scripts directly. App.qml exposes them through the App.scripts object, and individual services import and invoke them by name. The descriptions below explain what each script does so you understand what is running on your system.
These scripts collect hardware metrics and process information on demand. They are called by SystemService and AiAnalysisService when alerts fire or when the AI needs diagnostic data.
Reads battery health from the appropriate platform source:
  • Linux — reads from /sys/class/power_supply/BAT0/ to get design capacity, full-charge capacity, cycle count, wear level, and temperature
  • macOS — queries ioreg for AppleSmartBattery data
  • Windows — uses the wmi module
Returns a JSON object with percentage, is_charging, status, time_remaining, wear_level_percent, cycle_count, and optional temperature data.
A multi-action script invoked with --action cpu, --action ram, --action temps, or --action all.
  • --action cpu — uses psutil to sample all running processes twice with a 0.5-second interval, then returns the top 20 by normalised CPU percentage (divided by logical core count)
  • --action ram — returns the top 20 processes by memory percentage and resident set size (MB)
  • --action temps — collects CPU temperatures via psutil.sensors_temperatures(), GPU temperatures via nvidia-smi or lm-sensors, and storage temperatures via psutil and smartctl; returns per-device readings plus cpu_max_temp, gpu_max_temp, and storage_max_temp
This is the primary diagnostic script called by AiAnalysisService when assembling the AI spike-analysis payload.
Runs as a persistent process inside SystemService. Streams a JSON line per tick containing current CPU usage, RAM usage, and temperature. SystemService parses each line and updates its reactive properties.
Quick single-value reads used for lightweight polling:
ScriptOutput
cpu_usage.shCurrent CPU usage percentage
ram_usage.shCurrent RAM usage percentage
temp.shCurrent hardware temperature
internet.shCurrent network interface speed (also available as network/live_usage.py)

Path resolution via App.qml

All script paths are resolved through App.scripts in App.qml. This object maps logical names to absolute paths at runtime, so services never hard-code file system paths. When you install NibrasShell to a non-default location, updating App.qml is the only change needed to keep every service working correctly.
// Example — how AiAnalysisService references a script
AiService.sendRequest(App.scripts.python.callSpikeAnalysisAi, ["--message", JSON.stringify(payload)], ...)
If you add a custom script, register it in App.qml under App.scripts so it inherits the same path-resolution behaviour. Avoid referencing script paths directly inside service files.

Build docs developers (and LLMs) love