this repo has no description
0
fork

Configure Feed

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

Add setTerminalDefaultProfile function

+17 -3
+8 -2
index.js
··· 1 - import {runAppleScript} from 'run-applescript'; 1 + import { runAppleScript } from "run-applescript"; 2 2 3 3 /** 4 4 * @param {string} profile 5 5 * @return {Promise<void>} 6 6 */ 7 7 export async function setTerminalProfile(profile) { 8 - await runAppleScript(`tell application "Terminal" 8 + await runAppleScript(`tell application "Terminal" 9 9 set current settings of tabs of windows to settings set "${profile}" 10 10 end tell`); 11 11 } 12 + 13 + export async function setTerminalDefaultProfile(profile) { 14 + await runAppleScript(`tell application "Terminal" 15 + set default settings to settings set "${profile}" 16 + end tell`); 17 + }
+9 -1
readme.md
··· 11 11 ## Usage 12 12 13 13 ```javascript 14 - import { setTerminalProfile } from "terminal-profile"; 14 + import { 15 + setTerminalProfile, 16 + setTerminalDefaultProfile, 17 + } from "terminal-profile"; 15 18 16 19 await setTerminalProfile("One Dark"); 20 + await setTerminalDefaultProfile("gruvbox-dark"); 17 21 ``` 18 22 19 23 ## API ··· 21 25 ### `setTerminalProfile(profile)` 22 26 23 27 Update all of Terminal&rsquo;s windows and tabs to the `profile` profile. 28 + 29 + ### `setTerminalProfile(profile)` 30 + 31 + Update Terminal to use the `profile` by default. 24 32 25 33 ## Acknowledgements 26 34