this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

JavaScript 100.0%
95 1 14

Clone this repository

https://tangled.org/ptrkc.sk/mac-terminal https://tangled.org/did:plc:6yqiskp66bz65u2hg3rtqvkv/mac-terminal
git@tangled.org:ptrkc.sk/mac-terminal git@tangled.org:did:plc:6yqiskp66bz65u2hg3rtqvkv/mac-terminal

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
readme.md

mac-terminal#

Control the macOS Terminal app with Node.js

Install#

npm install mac-terminal

API#

getTerminalDefaultProfile()#

Get the default Terminal profile

Signature#

function getTerminalDefaultProfile(): Promise<string>;

Example#

import {getTerminalDefaultProfile} from 'mac-terminal';

await getTerminalDefaultProfile(); // 'Clear Dark'

getTerminalProfiles()#

Get the list of installed Terminal profiles

Signature#

function getTerminalProfiles(): Promise<string[]>;

Example#

import {getTerminalProfiles} from 'mac-terminal';

await getTerminalProfiles(); // ['Basic', 'Clear Dark', 'Clear Light', ...]

isTerminalRunning()#

Determine whether Terminal is currently running

Signature#

function isTerminalRunning(): Promise<boolean>;

Example#

import {isTerminalRunning} from 'mac-terminal';

await isTerminalRunning(); // true

setTerminalDefaultProfile()#

Update the default Terminal profile

Signature#

function setTerminalDefaultProfile(profile: string): Promise<void>;

Example#

import {setTerminalDefaultProfile} from 'mac-terminal';

await setTerminalDefaultProfile('Clear Dark');

setTerminalProfile()#

Update the Terminal profile for all open tabs and windows, and optionally update the default profile at the same time

Signature#

function setTerminalProfile({
	profile: string,
	setDefault?: boolean = false
}): Promise<void>;

Examples#

import {setTerminalProfile} from 'mac-terminal';

await setTerminalProfile({profile: 'Clear Dark'});

await setTerminalProfile({
	profile: 'Clear Dark',
	setDefault: true, // Also set as the default profile
});