diff --git a/Assets/MatugenTemplates/niri.kdl b/Assets/MatugenTemplates/niri.kdl new file mode 100644 index 00000000..6646dc84 --- /dev/null +++ b/Assets/MatugenTemplates/niri.kdl @@ -0,0 +1,29 @@ +layout { + background-color "transparent" + + focus-ring { + active-color "{{colors.primary.default.hex}}" + inactive-color "{{colors.outline.default.hex}}" + urgent-color "{{colors.error.default.hex}}" + } + + border { + active-color "{{colors.primary.default.hex}}" + inactive-color "{{colors.outline.default.hex}}" + urgent-color "{{colors.error.default.hex}}" + } + + shadow { + color "{{colors.shadow.default.hex}}70" + } + + tab-indicator { + active-color "{{colors.primary.default.hex}}" + inactive-color "{{colors.outline.default.hex}}" + urgent-color "{{colors.error.default.hex}}" + } + + insert-hint { + color "{{colors.primary.default.hex}}80" + } +} diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 7b7b5c03..01d6b431 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Fenster-Compositor-Theming", + "label": "Compositor/innen", + "niri": { + "description": "{filepath}\n\nBenötigt niri v25.11+", + "description-missing": "Benötigt die Installation von {app}" + } + }, "misc": { "description": "Zusätzliche Konfigurationsoptionen.", "label": "Verschiedenes", @@ -1258,10 +1266,10 @@ "label": "Nachtlicht" }, "temperature": { - "description": "Farbwärme für Nacht- und Tageszeit einstellen.", - "label": "Farbtemperatur", "day": "Tag", "day-description": "Steuert die Farbtemperatur tagsüber.", + "description": "Farbwärme für Nacht- und Tageszeit einstellen.", + "label": "Farbtemperatur", "night": "Nacht", "night-description": "Steuert die Farbtemperatur nachts." } diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 29fd3a4b..aa018368 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Window compositor theming", + "label": "Compositors", + "niri": { + "description": "{filepath}\n\nRequires niri v25.11+", + "description-missing": "Requires {app} to be installed" + } + }, "misc": { "description": "Additional configuration options.", "label": "Misc", @@ -1258,10 +1266,10 @@ "label": "Night Light" }, "temperature": { - "description": "Set the color warmth for nighttime and daytime.", - "label": "Color temperature", "day": "Day", "day-description": "Controls the temperature during daytime.", + "description": "Set the color warmth for nighttime and daytime.", + "label": "Color temperature", "night": "Night", "night-description": "Controls the temperature during nighttime." } diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index b8b16ec8..9ea8a6c9 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Tematización del compositor de ventanas", + "label": "Compositores", + "niri": { + "description": "{filepath}\n\nRequiere niri v25.11+", + "description-missing": "Requiere que {app} esté instalada." + } + }, "misc": { "description": "Opciones de configuración adicionales.", "label": "Varios", @@ -1258,10 +1266,10 @@ "label": "Luz nocturna" }, "temperature": { - "description": "Establece la calidez del color para la noche y el día.", - "label": "Temperatura de color", "day": "Día", "day-description": "Controla la temperatura durante el día.", + "description": "Establece la calidez del color para la noche y el día.", + "label": "Temperatura de color", "night": "Noche", "night-description": "Controla la temperatura durante la noche." } diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index d67109fe..ca0cd371 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Thèmes du compositeur de fenêtres", + "label": "Compositeurs", + "niri": { + "description": "{filepath}\n\nRequiert niri v25.11+", + "description-missing": "Nécessite l'installation de {app}" + } + }, "misc": { "description": "Options de configuration supplémentaires.", "label": "Divers", @@ -1258,10 +1266,10 @@ "label": "Éclairage nocturne" }, "temperature": { - "description": "Réglez la chaleur des couleurs pour la nuit et le jour.", - "label": "Température de couleur", "day": "Jour", "day-description": "Contrôle la température pendant la journée.", + "description": "Réglez la chaleur des couleurs pour la nuit et le jour.", + "label": "Température de couleur", "night": "Nuit", "night-description": "Contrôle la température pendant la nuit." } diff --git a/Assets/Translations/ja.json b/Assets/Translations/ja.json index 1d164656..c9c1da01 100644 --- a/Assets/Translations/ja.json +++ b/Assets/Translations/ja.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "ウィンドウコンポジタのテーマ", + "label": "合成者", + "niri": { + "description": "{filepath}\n\nniri v25.11+ ga hitsuyou desu", + "description-missing": "{app} がインストールされている必要があります" + } + }, "misc": { "description": "その他の設定オプション", "label": "その他", @@ -1258,10 +1266,10 @@ "label": "夜間モード" }, "temperature": { - "description": "日中と夜間の色温度(暖かさ)を設定します。", - "label": "色温度", "day": "日中", "day-description": "昼間の色温度を調整します。", + "description": "日中と夜間の色温度(暖かさ)を設定します。", + "label": "色温度", "night": "夜間", "night-description": "夜間の色温度を調整します。" } diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 783857c8..e2116fc3 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Theming van venstersamensteller", + "label": "Compositors", + "niri": { + "description": "{filepath}\n\nVereist niri v25.11+", + "description-missing": "Vereist dat {app} is geïnstalleerd." + } + }, "misc": { "description": "Aanvullende configuratie-opties.", "label": "Diversen", @@ -1258,10 +1266,10 @@ "label": "Nachtlicht" }, "temperature": { - "description": "Stel de kleurwarmte voor nacht en dag in.", - "label": "Kleurtemperatuur", "day": "Dag", "day-description": "Regelt de kleurtemperatuur overdag.", + "description": "Stel de kleurwarmte voor nacht en dag in.", + "label": "Kleurtemperatuur", "night": "Nacht", "night-description": "Regelt de kleurtemperatuur 's nachts." } diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 4cc2c43e..9cbcb4e4 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Tematização do compositor de janelas", + "label": "Compositores", + "niri": { + "description": "{filepath}\n\nRequer Niri v25.11+", + "description-missing": "Requer que o {app} esteja instalado." + } + }, "misc": { "description": "Opções de configuração adicionais.", "label": "Diversos", @@ -1258,10 +1266,10 @@ "label": "Luz noturna" }, "temperature": { - "description": "Defina o quão quente a cor será durante a noite e o dia.", - "label": "Temperatura da cor", "day": "Dia", "day-description": "Controla a temperatura durante o dia.", + "description": "Defina o quão quente a cor será durante a noite e o dia.", + "label": "Temperatura da cor", "night": "Noite", "night-description": "Controla a temperatura durante a noite." } diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 491b5ff7..d96b648c 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Оформление композитора окон", + "label": "Компоновщики", + "niri": { + "description": "{filepath}\n\nТребуется niri v25.11+", + "description-missing": "Требуется установка {app}" + } + }, "misc": { "description": "Дополнительные параметры конфигурации.", "label": "Разное", @@ -1258,10 +1266,10 @@ "label": "Ночной свет" }, "temperature": { - "description": "Установите цветовую температуру для ночного и дневного времени.", - "label": "Цветовая температура", "day": "День", "day-description": "Управляет цветовой температурой в дневное время.", + "description": "Установите цветовую температуру для ночного и дневного времени.", + "label": "Цветовая температура", "night": "Ночь", "night-description": "Управляет цветовой температурой в ночное время." } diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 8e194d6c..e32f925e 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Pencere birleştirici temalandırma", + "label": "Birleştiriciler", + "niri": { + "description": "{filepath}\n\nniri v25.11+ gerektirir", + "description-missing": "{app} yüklü olmalıdır" + } + }, "misc": { "description": "Ek yapılandırma seçenekleri.", "label": "Çeşitli", @@ -1258,10 +1266,10 @@ "label": "Gece ışığı" }, "temperature": { - "description": "Gece ve gündüz için renk sıcaklığını ayarlayın.", - "label": "Renk sıcaklığı", "day": "Gündüz", "day-description": "Gündüz saatlerindeki renk sıcaklığını kontrol eder.", + "description": "Gece ve gündüz için renk sıcaklığını ayarlayın.", + "label": "Renk sıcaklığı", "night": "Gece", "night-description": "Gece saatlerindeki renk sıcaklığını kontrol eder." } diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 03c82f87..6a235055 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "Оформлення композитора вікон", + "label": "Композитори", + "niri": { + "description": "{filepath}\n\nПотребує niri v25.11+", + "description-missing": "Потрібно встановити {app}" + } + }, "misc": { "description": "Додаткові параметри конфігурації.", "label": "Різне", @@ -1258,10 +1266,10 @@ "label": "Нічне світло" }, "temperature": { - "description": "Встановіть теплоту кольору для нічного та денного часу.", - "label": "Колірна температура", "day": "День", "day-description": "Керує колірною температурою вдень.", + "description": "Встановіть теплоту кольору для нічного та денного часу.", + "label": "Колірна температура", "night": "Ніч", "night-description": "Керує колірною температурою вночі." } diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 845b6e8f..de3ac18b 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1037,6 +1037,14 @@ } }, "templates": { + "compositors": { + "description": "窗口合成器主题", + "label": "合成器", + "niri": { + "description": "{filepath}\n\n需要 niri v25.11+", + "description-missing": "需要安装 {app}" + } + }, "misc": { "description": "其他配置选项。", "label": "杂项", @@ -1258,10 +1266,10 @@ "label": "夜间模式" }, "temperature": { - "description": "设置夜间和白天的颜色温暖度。", - "label": "色温", "day": "白天", "day-description": "控制白天的色温。", + "description": "设置夜间和白天的颜色温暖度。", + "label": "色温", "night": "夜间", "night-description": "控制夜间的色温。" } diff --git a/Bin/colors-apply.sh b/Bin/colors-apply.sh index 16574ba7..4f41acaa 100755 --- a/Bin/colors-apply.sh +++ b/Bin/colors-apply.sh @@ -4,7 +4,7 @@ if [ "$#" -ne 1 ]; then # Print usage information to standard error. echo "Error: No application specified." >&2 - echo "Usage: $0 {kitty|ghostty|foot|alacritty|wezterm|fuzzel|walker|pywalfox|cava}" >&2 + echo "Usage: $0 {kitty|ghostty|foot|alacritty|wezterm|fuzzel|walker|pywalfox|cava|niri}" >&2 exit 1 fi @@ -252,6 +252,29 @@ cava) fi ;; +niri) + echo "🎨 Applying 'noctalia' theme to niri..." + CONFIG_FILE="$HOME/.config/niri/config.kdl" + INCLUDE_LINE='include "./noctalia.kdl"' + + # Check if the config file exists. + if [ ! -f "$CONFIG_FILE" ]; then + echo "Config file not found, creating $CONFIG_FILE..." + mkdir -p "$(dirname "$CONFIG_FILE")" + echo "$INCLUDE_LINE" >"$CONFIG_FILE" + echo "Created new config file with noctalia theme." + else + # Check if include line already exists + if grep -qF "$INCLUDE_LINE" "$CONFIG_FILE"; then + echo "Theme already included, skipping modification." + else + # Add the include line to the end of the file + echo "$INCLUDE_LINE" >>"$CONFIG_FILE" + echo "✅ Added noctalia theme include to config." + fi + fi + ;; + *) # Handle unknown application names. echo "Error: Unknown application '$APP_NAME'." >&2 diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 58e200de..63f0af16 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -549,6 +549,7 @@ Singleton { property bool telegram: false property bool cava: false property bool emacs: false + property bool niri: false property bool enableUserTemplates: false } diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml index 4459af50..011c085e 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml @@ -574,6 +574,32 @@ ColumnLayout { } } + // Compositors + NCollapsible { + Layout.fillWidth: true + label: I18n.tr("settings.color-scheme.templates.compositors.label") + description: I18n.tr("settings.color-scheme.templates.compositors.description") + defaultExpanded: false + + NCheckbox { + label: "Niri" + description: ProgramCheckerService.niriAvailable ? I18n.tr("settings.color-scheme.templates.compositors.niri.description", { + "filepath": "~/.config/niri/noctalia.kdl" + }) : I18n.tr("settings.color-scheme.templates.compositors.niri.description-missing", { + "app": "niri" + }) + checked: Settings.data.templates.niri + enabled: ProgramCheckerService.niriAvailable + opacity: ProgramCheckerService.niriAvailable ? 1.0 : 0.6 + onToggled: checked => { + if (ProgramCheckerService.niriAvailable) { + Settings.data.templates.niri = checked; + AppThemeService.generate(); + } + } + } + } + // Terminal Emulators NCollapsible { Layout.fillWidth: true @@ -883,6 +909,7 @@ ColumnLayout { } } } + // Miscellaneous NCollapsible { Layout.fillWidth: true diff --git a/Services/System/ProgramCheckerService.qml b/Services/System/ProgramCheckerService.qml index aad945e7..2a8f240e 100644 --- a/Services/System/ProgramCheckerService.qml +++ b/Services/System/ProgramCheckerService.qml @@ -30,6 +30,7 @@ Singleton { property bool telegramAvailable: false property bool cavaAvailable: false property bool emacsAvailable: false + property bool niriAvailable: false // Discord client auto-detection property var availableDiscordClients: [] @@ -187,7 +188,8 @@ Singleton { "spicetifyAvailable": ["which", "spicetify"], "telegramAvailable": ["sh", "-c", "command -v telegram-desktop >/dev/null 2>&1 || command -v Telegram >/dev/null 2>&1 || (command -v flatpak >/dev/null 2>&1 && flatpak list --app | grep -q 'org.telegram.desktop')"], "cavaAvailable": ["which", "cava"], - "emacsAvailable": ["sh", "-c", "test -d \"$HOME/.config/doom\" || test -d \"$HOME/.emacs.d\""] + "emacsAvailable": ["sh", "-c", "test -d \"$HOME/.config/doom\" || test -d \"$HOME/.emacs.d\""], + "niriAvailable": ["which", "niri"] }) // Internal tracking diff --git a/Services/Theming/TemplateRegistry.qml b/Services/Theming/TemplateRegistry.qml index d4ea7e08..7a60812c 100644 --- a/Services/Theming/TemplateRegistry.qml +++ b/Services/Theming/TemplateRegistry.qml @@ -246,6 +246,18 @@ Singleton { } ], "checkDoomFirst": true + }, + { + "id": "niri", + "name": "Niri", + "category": "compositors", + "input": "niri.kdl", + "outputs": [ + { + "path": "~/.config/niri/noctalia.kdl" + } + ], + "postProcess": () => `${colorsApplyScript} niri` } ]