Matugen/niri: added

This commit is contained in:
Ly-sec
2025-11-29 12:26:18 +01:00
parent fd9341d2f1
commit 366c867f94
17 changed files with 206 additions and 24 deletions

View File

@@ -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"
}
}

View File

@@ -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."
}

View File

@@ -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."
}

View File

@@ -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."
}

View File

@@ -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."
}

View File

@@ -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": "夜間の色温度を調整します。"
}

View File

@@ -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."
}

View File

@@ -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."
}

View File

@@ -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": "Управляет цветовой температурой в ночное время."
}

View File

@@ -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."
}

View File

@@ -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": "Керує колірною температурою вночі."
}

View File

@@ -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": "控制夜间的色温。"
}

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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`
}
]