Electron AutoTheme: The Power of Dynamic Theming for Electron Apps

Electron AutoTheme

The specified function is triggered at sunset and sunrise.

Example

import { AutoTheme } from "electron-autotheme";

function setWindowTheme(useDark: boolean) {
    /* ... */
}

new AutoTheme(setWindowTheme);

// With electron-store
const store = new Store();

new AutoTheme(setWindowTheme, store);

Electron Store

If you want to use electron-store to store the last location (for 48 hours), you can pass it as the second argument.

Example

{
    "electron-autotheme": {
        "location": {
            "latitude": 0,
            "longitude": 0
        },
        "date": "2020-01-01T00:00:00.000Z"
    }
}

Download Details:

Author: zephraOSS
Source Code: https://github.com/zephraOSS/Electron-AutoTheme 
License: MIT license

#electron #auto 

Electron AutoTheme: The Power of Dynamic Theming for Electron Apps
1.00 GEEK