Skip to content

Expose current profile's name through env var or contour front-end VT call #1637

@whisperity

Description

@whisperity

In order to allow shell scripts to rely on setting the environment up for a particular colour scheme and behaviour, the current (or startup) profile's name should be queryable either through an environment variable, or via a VT sequence and a front-end hook similar to contour capture.

Contour Terminal version

0.5.1.7247

Installer source

GitHub: release page

Operating System

macOS San Sequioya 15.1

Architecture

ARM64

Other Software

No response

Steps to reproduce

Add an environment variable into the Contour configuration, such as

profiles:
	master:
		environment:
			FOO: "Bar"
default_profile: "master"

Spawn a shell, echo $FOO, and nothing comes out.

Expected Behavior

The environment variables get defined. This used to work, at least on Linux some time ago.

Actual Behavior

Nothing comes out, the variable is left undefined.

Additional notes

$ contour debug "config"
[2024-10-16 15:10:27.823766] [config] Loading default profile: master
[2024-10-16 15:10:27.823772] [config] loading profile master
[2024-10-16 15:10:27.823809] [config] Defaulting TERM to contour.

While a lot of configuration options are mentioned in the log file as "loading entry: ...", environment is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestUser requested featuresfrontendContour Terminal Emulator (GUI frontend)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions