this repo has no description
0
fork

Configure Feed

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

Merge pull request #1 from e0da/setTerminalDefaultProfile

Set terminal default profile

authored by

Patrik Csak and committed by
GitHub
f39a23b7 cb6d4fac

+34 -1
+6
changelog.md
··· 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 7 8 + ## [Unreleased](https://github.com/ptrkcsk/terminal-profile/compare/v1.1.0...HEAD) 9 + 10 + ### Added 11 + 12 + - [`setTerminalDefaultProfile()`](readme.md#setterminaldefaultprofile) 13 + 8 14 ## [1.1.0](https://github.com/ptrkcsk/terminal-profile/compare/v1.0.3...v1.1.0) - 2022-12-03 9 15 10 16 ### Added
+10
index.js
··· 9 9 set current settings of tabs of windows to settings set "${profile}" 10 10 end tell`); 11 11 } 12 + 13 + /** 14 + * @param {string} profile 15 + * @return {Promise<void>} 16 + */ 17 + export async function setTerminalDefaultProfile(profile) { 18 + await runAppleScript(`tell application "Terminal" 19 + set default settings to settings set "${profile}" 20 + end tell`); 21 + }
+18 -1
readme.md
··· 11 11 ## Usage 12 12 13 13 ```javascript 14 - import { setTerminalProfile } from "terminal-profile"; 14 + import { 15 + setTerminalDefaultProfile, 16 + setTerminalProfile, 17 + } from "terminal-profile"; 15 18 16 19 await setTerminalProfile("One Dark"); 20 + 21 + await setTerminalDefaultProfile("gruvbox-dark"); 17 22 ``` 18 23 19 24 ## API ··· 25 30 ``` 26 31 27 32 Update all of Terminal’s windows and tabs to the `profile` profile 33 + 34 + ### `setTerminalDefaultProfile` 35 + 36 + ```typescript 37 + function setTerminalDefaultProfile(profile: string): Promise<void>; 38 + ``` 39 + 40 + Update Terminal&rsquo;s default profile to `profile` 41 + 42 + ## Acknowledgements 43 + 44 + Thanks to [Jimmy Bosse](https://github.com/jbosse) for his [Stack Overflow answer](https://stackoverflow.com/a/66080297/4411309) 28 45 29 46 ## Related 30 47