From 1c40f3a88491d376b0ecb8bcf6fdd6aa668e565f Mon Sep 17 00:00:00 2001 From: Hannes Date: Wed, 18 Feb 2026 16:11:51 +0100 Subject: [PATCH] Added support for Quickshell --- config.toml | 6 ++++- templates/quickshell.qml | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 templates/quickshell.qml diff --git a/config.toml b/config.toml index 0270a8e..f4ff1d9 100644 --- a/config.toml +++ b/config.toml @@ -3,4 +3,8 @@ mode = "dark" # where generated files go (optional, but good to define) -output_dir = "~/.config/matugen/generated" \ No newline at end of file +output_dir = "~/.config/matugen/generated" + +[templates.quickshell] +input_path = "~/.config/matugen/templates/quickshell.qml" +output_path = "~/.config/quickshell/colors/Colors.qml" \ No newline at end of file diff --git a/templates/quickshell.qml b/templates/quickshell.qml new file mode 100644 index 0000000..8f7bfe8 --- /dev/null +++ b/templates/quickshell.qml @@ -0,0 +1,57 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + + // ===== PRIMARY ===== + readonly property color primary: "{{colors.primary.default.hex}}" + readonly property color primary_fg: "{{colors.on_primary.default.hex}}" + readonly property color primaryContainer: "{{colors.primary_container.default.hex}}" + readonly property color primaryContainer_fg: "{{colors.on_primary_container.default.hex}}" + + // ===== SECONDARY ===== + readonly property color secondary: "{{colors.secondary.default.hex}}" + readonly property color secondary_fg: "{{colors.on_secondary.default.hex}}" + readonly property color secondaryContainer: "{{colors.secondary_container.default.hex}}" + readonly property color secondaryContainer_fg: "{{colors.on_secondary_container.default.hex}}" + + // ===== TERTIARY ===== + readonly property color tertiary: "{{colors.tertiary.default.hex}}" + readonly property color tertiary_fg: "{{colors.on_tertiary.default.hex}}" + readonly property color tertiaryContainer: "{{colors.tertiary_container.default.hex}}" + readonly property color tertiaryContainer_fg: "{{colors.on_tertiary_container.default.hex}}" + + // ===== ERROR ===== + readonly property color error: "{{colors.error.default.hex}}" + readonly property color error_fg: "{{colors.on_error.default.hex}}" + readonly property color errorContainer: "{{colors.error_container.default.hex}}" + readonly property color errorContainer_fg: "{{colors.on_error_container.default.hex}}" + + // ===== BACKGROUND / SURFACE ===== + readonly property color background: "{{colors.background.default.hex}}" + readonly property color background_fg: "{{colors.on_background.default.hex}}" + + readonly property color surface: "{{colors.surface.default.hex}}" + readonly property color surface_fg: "{{colors.on_surface.default.hex}}" + + readonly property color surfaceVariant: "{{colors.surface_variant.default.hex}}" + readonly property color surfaceVariant_fg: "{{colors.on_surface_variant.default.hex}}" + + // ===== SURFACE CONTAINERS ===== + readonly property color surfaceContainerLowest: "{{colors.surface_container_lowest.default.hex}}" + readonly property color surfaceContainerLow: "{{colors.surface_container_low.default.hex}}" + readonly property color surfaceContainer: "{{colors.surface_container.default.hex}}" + readonly property color surfaceContainerHigh: "{{colors.surface_container_high.default.hex}}" + readonly property color surfaceContainerHighest: "{{colors.surface_container_highest.default.hex}}" + + // ===== OUTLINE / UTILITY ===== + readonly property color outline: "{{colors.outline.default.hex}}" + readonly property color outlineVariant: "{{colors.outline_variant.default.hex}}" + readonly property color shadowColor: "{{colors.shadow.default.hex}}" + readonly property color scrimColor: "{{colors.scrim.default.hex}}" + + // ===== INVERSE ===== + readonly property color inverseSurface: "{{colors.inverse_surface.default.hex}}" + readonly property color inverseSurface_fg: "{{colors.inverse_on_surface.default.hex}}" + readonly property color inversePrimary: "{{colors.inverse_primary.default.hex}}" +}