Compute the effective terminal render width.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_terminal_width

Purpose

Compute the effective terminal render width.

Description

Uses tput cols when available and falls back to 80 when no valid result is returned.

Output

Writes a number clamped between 40 and SGND_MAX_RENDER_WIDTH (default 140).

Returns

  • 0 after printing the width.

Usage

  sgnd_terminal_width