Files
animated_wallpaper/config.js
T

75 lines
3.4 KiB
JavaScript

/* Application configuration
*
* debug - Show debug panel (0/1)
*
* theme - Color palette. Pick one of the keys defined in window.THEMES
* below. To add a new theme, drop a new *.css file in the same
* directory and add an entry to window.THEMES.
*
* units - Measurement units for the weather widget.
* 'metric' (°C, km/h) or 'imperial' (°F, mph)
*
* language - UI language code. Add a new language by extending
* window.TRANSLATIONS in i18n.js. English ('en') is the base;
* if a key is missing in the current language, English is used.
*
* timeFormat - Format string for the digital clock, using strict
* ISO 8601 tokens (case-sensitive). Any other character is
* treated as a literal (including whitespace).
*
* YYYY 4-digit year (2026)
* MM month 01-12 (10) - always month
* DD day 01-31 (07)
* HH hour 00-23 (24h) (14)
* mm minute 00-59 (35) - lowercase!
* ss second 00-59 (22) - lowercase!
* sss millisecond 000-999 (456)
* T literal 'T'
*
* Non-standard extension tokens (localized via i18n):
* MMM month short name (Oct, Okt, Ott, ...)
* MMMM month full name (October, Oktober, ...)
* DDD weekday short name (Mon, Mo, Lu, ...)
* DDDD weekday full name (Monday, Montag, ...)
*
* Date-only forms: YYYY, YYYY-MM, YYYY-MM-DD
* Date-time forms: above + T + HH:mm, HH:mm:ss, HH:mm:ss.sss
* Any other character is a literal (incl. spaces, tabs, \n).
*
* Escape sequences (parsed in literal section):
* \n newline
* \t tab
* \\ literal backslash
*
* Note: MM is ALWAYS month (ISO). For minutes use mm (lowercase).
*
* Examples:
* 'HH:mm:ss' -> 14:35:22
* 'hh:mm:ss a' -> 02:35:22 PM
* 'YYYY-MM-DD' -> 2026-10-07
* 'YYYY-MM-DDTHH:mm:ss' -> 2026-10-07T14:35:22
* 'YYYY-MM-DDTHH:mm:ss.sss' -> 2026-10-07T14:35:22.456
* 'HH:mm:ss DDD' -> 14:35:22 Mon
* 'HH:mm:ss DDDD' -> 14:35:22 Monday
* 'HH:mm:ss MMM' -> 14:35:22 Oct
* 'HH:mm:ss MMMM' -> 14:35:22 October
* 'YYYY-MM-DD\tHH:mm:ss.sss a\n DDD MMM'
* -> 2026-10-07 14:35:22.456 PM
* Mon Oct
*/
window.CONFIG = {
debug: 1,
theme: 'ash',
units: 'metric',
language: 'en',
timeFormat: 'YYYY-MM-DD\tHH:mm:ss.sss a\n DDD MMM'
};
// List of available themes. The key is the theme id (used in config.theme),
// the value is the CSS file name. Add a new theme by adding a new entry here
// and dropping the corresponding CSS file in the same directory.
window.THEMES = {
'ash': 'ash.css',
'gruvbox': 'gruvbox.css',
'nord': 'nord.css'
};