this repo has no description
0
fork

Configure Feed

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

format

+31 -22
+4 -4
actions/enable.js
··· 1 - import {config} from "../config.js"; 2 - import {packageJson} from "../constants/index.js"; 3 - import {enableAutomaticSwitching} from "../functions/index.js"; 1 + import {config} from '../config.js'; 2 + import {packageJson} from '../constants/index.js'; 3 + import {enableAutomaticSwitching} from '../functions/index.js'; 4 4 5 5 export async function enable({darkProfile, lightProfile}) { 6 6 if (!darkProfile && !config.darkProfile) { ··· 21 21 await enableAutomaticSwitching(); 22 22 23 23 console.log('Automatic switching enabled'); 24 - } 24 + }
+5 -5
actions/index.js
··· 1 - export {disable} from './disable.js' 2 - export {enable} from './enable.js' 3 - export {setModeProfile} from './set-mode-profile.js' 4 - export {status} from './status.js' 5 - export {updateProfile} from './update-profile.js' 1 + export {disable} from './disable.js'; 2 + export {enable} from './enable.js'; 3 + export {setModeProfile} from './set-mode-profile.js'; 4 + export {status} from './status.js'; 5 + export {updateProfile} from './update-profile.js';
+2 -2
actions/set-mode-profile.js
··· 1 - import {config} from "../config.js"; 1 + import {config} from '../config.js'; 2 2 3 3 export function setModeProfile({mode, profile}) { 4 4 config[`${mode}Profile`] = profile; 5 5 6 6 console.log(`${mode} mode profile set to '${profile}'`); 7 - } 7 + }
+3 -3
actions/status.js
··· 1 - import {isAutomaticSwitchingEnabled} from "../functions/index.js"; 2 - import {config} from "../config.js"; 1 + import {isAutomaticSwitchingEnabled} from '../functions/index.js'; 2 + import {config} from '../config.js'; 3 3 4 - export async function status () { 4 + export async function status() { 5 5 console.log( 6 6 `automatic switching : ${ 7 7 (await isAutomaticSwitchingEnabled()) ? 'enabled' : 'disabled'
+5 -5
actions/update-profile.js
··· 1 - import {config} from "../config.js"; 2 - import darkMode from "dark-mode"; 3 - import {setTerminalProfile} from "terminal-profile"; 1 + import darkMode from 'dark-mode'; 2 + import {setTerminalProfile} from 'terminal-profile'; 3 + import {config} from '../config.js'; 4 4 5 - export async function updateProfile () { 5 + export async function updateProfile() { 6 6 if (!config.darkProfile) { 7 7 throw new Error('Dark profile not set'); 8 8 } ··· 14 14 const mode = (await darkMode.isEnabled()) ? 'dark' : 'light'; 15 15 16 16 await setTerminalProfile(config[`${mode}Profile`]); 17 - } 17 + }
+12 -3
cli.js
··· 3 3 import {fileURLToPath} from 'node:url'; 4 4 import {program} from 'commander'; 5 5 import {packageJson} from './constants/index.js'; 6 - import {disable, enable, setModeProfile, status, updateProfile} from "./actions/index.js"; 6 + import { 7 + disable, 8 + enable, 9 + setModeProfile, 10 + status, 11 + updateProfile, 12 + } from './actions/index.js'; 7 13 8 14 program 9 15 .name(packageJson.name) ··· 19 25 .action(disable); 20 26 21 27 program 22 - .command('enable') 23 - .description( 'Enable automatic macOS Terminal profile switching based on system dark / light mode') 28 + .command( 29 + 'enable') 30 + .description( 31 + 'Enable automatic macOS Terminal profile switching based on system dark / light mode', 32 + ) 24 33 .option( 25 34 '--dark-profile <profile>', 26 35 'dark profile name, for example "One Dark"',