mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
template-processor: default to material design
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Fuzzel Colors
|
||||
# Generated with Template Processor
|
||||
# Generated by Noctalia's Template Processor
|
||||
|
||||
[colors]
|
||||
background={{colors.background.default.hex_stripped}}CC
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* GTK Colors
|
||||
* Generated with Template Processor
|
||||
* Generated by Noctalia's Template Processor
|
||||
*/
|
||||
|
||||
@define-color accent_color {{colors.primary.default.hex}};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Material You theme for Telegram Desktop
|
||||
// Generated by Template Processor
|
||||
// Generated by Noctalia's Template Processor
|
||||
|
||||
COLOR_GRAY: {{colors.outline.default.hex}};
|
||||
COLOR_DARK: {{colors.surface_variant.default.hex}};
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Aktualisieren",
|
||||
"upload": "Hochladen",
|
||||
"version": "Version",
|
||||
"vibrant": "Lebhaft",
|
||||
"visualizer": "Visualisierer",
|
||||
"volume": "Lautstärke",
|
||||
"volumes": "Lautstärken",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Schreibt: {filepath}",
|
||||
"title": "Farbschema",
|
||||
"wallpaper-method-description": "Wählen Sie Ihre bevorzugte Methode zur Palettengenerierung.",
|
||||
"wallpaper-method-label": "Farbextraktionsmethode"
|
||||
"wallpaper-method-label": "Methode zur Palettengenerierung"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Passen Sie an, welche Steuerelemente im Kontrollzentrum angezeigt werden und in welcher Reihenfolge.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Update",
|
||||
"upload": "Upload",
|
||||
"version": "Version",
|
||||
"vibrant": "Vibrant",
|
||||
"visualizer": "Visualizer",
|
||||
"volume": "Volume",
|
||||
"volumes": "Volumes",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Writes: {filepath}",
|
||||
"title": "Color Scheme",
|
||||
"wallpaper-method-description": "Choose your favorite palette generation method.",
|
||||
"wallpaper-method-label": "Color extraction method"
|
||||
"wallpaper-method-label": "Palette generation method"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Customize which controls appear in the control center and in what order.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Actualizar",
|
||||
"upload": "Subir",
|
||||
"version": "Versión",
|
||||
"vibrant": "Vibrante",
|
||||
"visualizer": "Visualizador",
|
||||
"volume": "Volumen",
|
||||
"volumes": "Volúmenes",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Escribe: {filepath}",
|
||||
"title": "Esquema de colores",
|
||||
"wallpaper-method-description": "Elige tu método de generación de paleta favorito.",
|
||||
"wallpaper-method-label": "Método de extracción de color"
|
||||
"wallpaper-method-label": "Método de generación de paleta"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Personaliza qué controles aparecen en el centro de control y en qué orden.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Mise à jour",
|
||||
"upload": "Téléverser",
|
||||
"version": "Version",
|
||||
"vibrant": "Vibrant",
|
||||
"visualizer": "Visualiseur",
|
||||
"volume": "Volume",
|
||||
"volumes": "Volumes",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Écrit : {filepath}",
|
||||
"title": "Jeu de couleurs",
|
||||
"wallpaper-method-description": "Choisissez votre méthode de génération de palette préférée.",
|
||||
"wallpaper-method-label": "Méthode d'extraction des couleurs"
|
||||
"wallpaper-method-label": "Méthode de génération de palette"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Personnalisez les commandes qui apparaissent dans le centre de contrôle et leur ordre d'affichage.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Frissítés",
|
||||
"upload": "Feltöltés",
|
||||
"version": "Verzió",
|
||||
"vibrant": "Élénk",
|
||||
"visualizer": "Vizualizáló",
|
||||
"volume": "Térfogat",
|
||||
"volumes": "Kötetek",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Írja: {filepath}",
|
||||
"title": "Színséma",
|
||||
"wallpaper-method-description": "Válassza ki a kedvenc palettagenerálási módszereit.",
|
||||
"wallpaper-method-label": "Színkivonási módszer"
|
||||
"wallpaper-method-label": "Paletta generálási módszer"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Személyre szabhatja, hogy mely vezérlők jelenjenek meg a vezérlőközpontban és milyen sorrendben.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "アップデート",
|
||||
"upload": "アップロード",
|
||||
"version": "バージョン",
|
||||
"vibrant": "鮮やか",
|
||||
"visualizer": "ビジュアライザー",
|
||||
"volume": "ボリューム",
|
||||
"volumes": "ボリューム",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "書き込み先: {filepath}",
|
||||
"title": "配色",
|
||||
"wallpaper-method-description": "お好みのパレット生成方法を選択してください。",
|
||||
"wallpaper-method-label": "色の抽出方法"
|
||||
"wallpaper-method-label": "パレット生成方法"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "コントロールセンターに表示する項目と、その順序をカスタマイズします。",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Nûkirin",
|
||||
"upload": "Barkirin",
|
||||
"version": "Guherto",
|
||||
"vibrant": "Geş",
|
||||
"visualizer": "Dîmender",
|
||||
"volume": "Hêjmar",
|
||||
"volumes": "Cild",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Dinivîse: {filepath}",
|
||||
"title": "Şêweya rengan",
|
||||
"wallpaper-method-description": "Rêbaza xweya bijarte ya hilberîna paletê hilbijêre.",
|
||||
"wallpaper-method-label": "Rêbaza derxistina rengan"
|
||||
"wallpaper-method-label": "Rêbaza çêkirina paletê"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Xwerû bike ka kîjan kontrol di navenda kontrolê de û bi çi rêzê de xuya dibin.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Update",
|
||||
"upload": "Uploaden",
|
||||
"version": "Versie",
|
||||
"vibrant": "Levendig",
|
||||
"visualizer": "Visualiseerder",
|
||||
"volume": "Volume",
|
||||
"volumes": "Volumes",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Schrijft: {filepath}",
|
||||
"title": "Kleurschema",
|
||||
"wallpaper-method-description": "Kies je favoriete methode voor het genereren van paletten.",
|
||||
"wallpaper-method-label": "Kleurextractiemethode"
|
||||
"wallpaper-method-label": "Paletgeneratiemethode"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Pas aan welke bedieningselementen in het bedieningscentrum verschijnen en in welke volgorde.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Aktualizacja",
|
||||
"upload": "Wyślij",
|
||||
"version": "Wersja",
|
||||
"vibrant": "Żywy",
|
||||
"visualizer": "Wizualizator",
|
||||
"volume": "Objętość",
|
||||
"volumes": "Tomy",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Zapisuje: {filepath}",
|
||||
"title": "Schemat kolorów",
|
||||
"wallpaper-method-description": "Wybierz swoją ulubioną metodę generowania palety.",
|
||||
"wallpaper-method-label": "Metoda ekstrakcji kolorów"
|
||||
"wallpaper-method-label": "Metoda generowania palety"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Dostosuj, które kontrolki pojawiają się w centrum sterowania i w jakiej kolejności.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Atualização",
|
||||
"upload": "Enviar",
|
||||
"version": "Versão",
|
||||
"vibrant": "Vibrante",
|
||||
"visualizer": "Visualizador",
|
||||
"volume": "Volume",
|
||||
"volumes": "Volumes",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Escreve: {filepath}",
|
||||
"title": "Esquema de cores",
|
||||
"wallpaper-method-description": "Escolha o seu método de geração de paleta favorito.",
|
||||
"wallpaper-method-label": "Método de extração de cor"
|
||||
"wallpaper-method-label": "Método de geração de paleta"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Personalize quais controles aparecem na central de controle e em que ordem.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Обновление",
|
||||
"upload": "Загрузить",
|
||||
"version": "Версия",
|
||||
"vibrant": "Яркий",
|
||||
"visualizer": "Визуализатор",
|
||||
"volume": "Объём",
|
||||
"volumes": "Тома",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Записывает: {filepath}",
|
||||
"title": "Цветовая схема",
|
||||
"wallpaper-method-description": "Выберите ваш любимый метод генерации палитры.",
|
||||
"wallpaper-method-label": "Метод извлечения цвета"
|
||||
"wallpaper-method-label": "Метод генерации палитры"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Настройте, какие элементы управления появляются в центре управления и в каком порядке.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Güncelleme",
|
||||
"upload": "Yükle",
|
||||
"version": "Sürüm",
|
||||
"vibrant": "Canlı",
|
||||
"visualizer": "Görselleştirici",
|
||||
"volume": "Hacim",
|
||||
"volumes": "Hacimler",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Yazıyor: {filepath}",
|
||||
"title": "Renk şeması",
|
||||
"wallpaper-method-description": "Favori palet oluşturma yönteminizi seçin.",
|
||||
"wallpaper-method-label": "Renk çıkarma yöntemi"
|
||||
"wallpaper-method-label": "Palet oluşturma yöntemi"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Kontrol merkezinde hangi kontrollerin ve hangi sırada görüneceğini özelleştirin.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "Оновлення",
|
||||
"upload": "Вивантажити",
|
||||
"version": "Версія",
|
||||
"vibrant": "Яскравий",
|
||||
"visualizer": "Візуалізатор",
|
||||
"volume": "Об'єм",
|
||||
"volumes": "Обсяги",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "Записує: {filepath}",
|
||||
"title": "Колірна схема",
|
||||
"wallpaper-method-description": "Оберіть свій улюблений метод створення палітри.",
|
||||
"wallpaper-method-label": "Метод вилучення кольору"
|
||||
"wallpaper-method-label": "Метод створення палітри"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "Налаштуйте, які елементи керування з'являються в центрі керування та в якому порядку.",
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
"update": "更新",
|
||||
"upload": "上传",
|
||||
"version": "版本",
|
||||
"vibrant": "鲜艳",
|
||||
"visualizer": "可视化工具",
|
||||
"volume": "音量",
|
||||
"volumes": "音量",
|
||||
@@ -773,7 +774,7 @@
|
||||
"templates-write-path": "写入:{filepath}",
|
||||
"title": "配色方案",
|
||||
"wallpaper-method-description": "选择您喜欢的调色板生成方法。",
|
||||
"wallpaper-method-label": "颜色提取方法"
|
||||
"wallpaper-method-label": "调色板生成方法"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "自定义在控制中心显示的控制项及其顺序。",
|
||||
|
||||
@@ -446,6 +446,7 @@
|
||||
"update": "更新",
|
||||
"upload": "上傳",
|
||||
"version": "版本",
|
||||
"vibrant": "鮮明",
|
||||
"visualizer": "視覺效果",
|
||||
"volume": "音量",
|
||||
"volumes": "音量",
|
||||
@@ -765,7 +766,7 @@
|
||||
"templates-write-path": "寫入: {filepath}",
|
||||
"title": "主題配色",
|
||||
"wallpaper-method-description": "選擇你喜歡的配色生成方法",
|
||||
"wallpaper-method-label": "色彩提取方式"
|
||||
"wallpaper-method-label": "調色盤產生方法"
|
||||
},
|
||||
"control-center": {
|
||||
"cards-desc": "自訂控制中心出現的控制項目及排序",
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
"schedulingMode": "off",
|
||||
"manualSunrise": "06:30",
|
||||
"manualSunset": "18:30",
|
||||
"extractionMethod": "default"
|
||||
"generationMethod": "material"
|
||||
},
|
||||
"templates": {
|
||||
"activeTemplates": [],
|
||||
|
||||
@@ -616,7 +616,7 @@ Singleton {
|
||||
property string schedulingMode: "off"
|
||||
property string manualSunrise: "06:30"
|
||||
property string manualSunset: "18:30"
|
||||
property string extractionMethod: "default"
|
||||
property string generationMethod: "material"
|
||||
}
|
||||
|
||||
// templates toggles
|
||||
|
||||
@@ -215,18 +215,18 @@ ColumnLayout {
|
||||
enabled: Settings.data.colorSchemes.useWallpaperColors
|
||||
visible: Settings.data.colorSchemes.useWallpaperColors
|
||||
model: [
|
||||
{
|
||||
"key": "default",
|
||||
"name": I18n.tr("common.default")
|
||||
},
|
||||
{
|
||||
"key": "material",
|
||||
"name": "Material Design" // Do not translate
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "vibrant",
|
||||
"name": I18n.tr("common.vibrant")
|
||||
},
|
||||
]
|
||||
currentKey: Settings.data.colorSchemes.extractionMethod
|
||||
currentKey: Settings.data.colorSchemes.generationMethod
|
||||
onSelected: key => {
|
||||
Settings.data.colorSchemes.extractionMethod = key;
|
||||
Settings.data.colorSchemes.generationMethod = key;
|
||||
AppThemeService.generate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Template processor - Wallpaper-based color extraction and theme generation.
|
||||
Noctalia's Template processor - Wallpaper-based color extraction and theme generation.
|
||||
|
||||
A CLI tool that extracts dominant colors from wallpaper images and generates palettes with optional templating:
|
||||
- Material Design 3 using HCT (Hue, Chroma, Tone) color space.
|
||||
@@ -10,8 +10,8 @@ Usage:
|
||||
python3 template-processor.py IMAGE_OR_JSON [OPTIONS]
|
||||
|
||||
Options:
|
||||
--default Generate vibrant accent-based colors (default)
|
||||
--material Generate Material Design 3 colors
|
||||
--material Generate Material Design 3 colors (default)
|
||||
--vibrant Generate vibrant accent-based colors
|
||||
--dark Generate dark theme only
|
||||
--light Generate light theme only
|
||||
--both Generate both themes (default)
|
||||
@@ -53,7 +53,7 @@ def parse_args() -> argparse.Namespace:
|
||||
epilog="""
|
||||
Examples:
|
||||
python3 template-processor.py wallpaper.png # default mode, both themes
|
||||
python3 template-processor.py wallpaper.png --material --dark # material mode, dark only
|
||||
python3 template-processor.py wallpaper.png --vibrant --dark # vibrant mode, dark only
|
||||
python3 template-processor.py wallpaper.jpg --dark -o theme.json # output to file
|
||||
python3 template-processor.py wallpaper.png -r tpl.txt:out.txt # render template
|
||||
"""
|
||||
@@ -71,13 +71,12 @@ Examples:
|
||||
style_group.add_argument(
|
||||
'--material',
|
||||
action='store_true',
|
||||
help='Generate Material Design 3 colors'
|
||||
help='Generate Material Design 3 colors (default)'
|
||||
)
|
||||
style_group.add_argument(
|
||||
'--default',
|
||||
'--vibrant',
|
||||
action='store_true',
|
||||
default=True,
|
||||
help='Generate vibrant accent-based palette (default)'
|
||||
help='Generate vibrant accent-based palette'
|
||||
)
|
||||
|
||||
# Theme mode (mutually exclusive)
|
||||
@@ -247,7 +246,7 @@ def main() -> int:
|
||||
return 1
|
||||
|
||||
# Generate theme for each mode
|
||||
use_material = args.material
|
||||
use_material = not args.vibrant
|
||||
for mode in modes:
|
||||
result[mode] = generate_theme(palette, mode, use_material)
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ Singleton {
|
||||
script += `NOCTALIA_WP_PATH=$(cat << '${wpDelimiter}'\n${wallpaper}\n${wpDelimiter}\n)\n`;
|
||||
|
||||
// Use template-processor.py (Python implementation)
|
||||
const styleFlag = (Settings.data.colorSchemes.extractionMethod === "default") ? "--default" : "--material";
|
||||
const styleFlag = (Settings.data.colorSchemes.generationMethod === "vibrant") ? "--vibrant" : "--material";
|
||||
// We pass --type for compatibility but it is ignored by internal logic unless needed
|
||||
script += `python3 "${templateProcessorScript}" "$NOCTALIA_WP_PATH" ${styleFlag} --config '${pathEsc}' --mode ${mode} `;
|
||||
|
||||
@@ -363,7 +363,7 @@ Singleton {
|
||||
// Otherwise, use single quotes for safety with file paths
|
||||
const inputQuoted = input.startsWith("$") ? `"${input}"` : `'${input.replace(/'/g, "'\\''")}'`;
|
||||
|
||||
const styleFlag = (Settings.data.colorSchemes.extractionMethod === "default") ? "--default" : "--material";
|
||||
const styleFlag = (Settings.data.colorSchemes.generationMethod === "vibrant") ? "--vibrant" : "--material";
|
||||
script += ` python3 "${templateProcessorScript}" ${inputQuoted} ${styleFlag} --config '${userConfigPath}' --mode ${mode}\n`;
|
||||
script += "fi";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user