From 2e7ea9d9f60c1f59ee43cb2a6efb522d88fed0dc Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 20 Feb 2026 09:11:43 +0100 Subject: [PATCH] fix gemini clock styling --- .../ii/background/widgets/clock/CookieClock.qml | 15 ++++----------- .../quickshell/ii/scripts/colors/switchwall.sh | 10 ++++++++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/CookieClock.qml b/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/CookieClock.qml index 7eaa04b98..f6ab64d81 100644 --- a/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/CookieClock.qml +++ b/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/CookieClock.qml @@ -66,16 +66,9 @@ Item { } } - Connections { - target: Config - function onReadyChanged() { - categoryFileView.path = Directories.generatedWallpaperCategoryPath - } - } - FileView { id: categoryFileView - path: "" + path: Config.ready ? Directories.generatedWallpaperCategoryPath : "" watchChanges: true onFileChanged: reload() onLoaded: { @@ -85,7 +78,7 @@ Item { property bool useSineCookie: Config.options.background.widgets.clock.cookie.useSineCookie StyledDropShadow { - target: useSineCookie ? sineCookieLoader : roundedPolygonCookieLoader + target: root.useSineCookie ? sineCookieLoader : roundedPolygonCookieLoader RotationAnimation on rotation { running: Config.options.background.widgets.clock.cookie.constantlyRotate @@ -100,7 +93,7 @@ Item { id: sineCookieLoader z: 0 visible: false // The DropShadow already draws it - active: useSineCookie + active: root.useSineCookie sourceComponent: SineCookie { implicitSize: root.implicitSize sides: Config.options.background.widgets.clock.cookie.sides @@ -111,7 +104,7 @@ Item { id: roundedPolygonCookieLoader z: 0 visible: false // The DropShadow already draws it - active: !useSineCookie + active: !root.useSineCookie sourceComponent: MaterialCookie { implicitSize: root.implicitSize sides: Config.options.background.widgets.clock.cookie.sides diff --git a/dots/.config/quickshell/ii/scripts/colors/switchwall.sh b/dots/.config/quickshell/ii/scripts/colors/switchwall.sh index 1ae164d0c..6352e3f6d 100755 --- a/dots/.config/quickshell/ii/scripts/colors/switchwall.sh +++ b/dots/.config/quickshell/ii/scripts/colors/switchwall.sh @@ -155,6 +155,12 @@ set_thumbnail_path() { fi } +categorize_wallpaper() { + img_cat=$("$SCRIPT_DIR/../ai/gemini-categorize-wallpaper.sh" "$1") + # notify-send "Wallpaper category" "$img_cat" + echo "$img_cat" > "$STATE_DIR/user/generated/wallpaper/category.txt" +} + switch() { imgpath="$1" mode_flag="$2" @@ -163,9 +169,9 @@ switch() { color="$5" # Start Gemini auto-categorization if enabled - aiStylingEnabled=$(jq -r '.background.clock.cookie.aiStyling' "$SHELL_CONFIG_FILE") + aiStylingEnabled=$(jq -r '.background.widgets.clock.cookie.aiStyling' "$SHELL_CONFIG_FILE") if [[ "$aiStylingEnabled" == "true" ]]; then - "$SCRIPT_DIR/../ai/gemini-categorize-wallpaper.sh" "$imgpath" > "$STATE_DIR/user/generated/wallpaper/category.txt" & + categorize_wallpaper "$imgpath" & fi read scale screenx screeny screensizey < <(hyprctl monitors -j | jq '.[] | select(.focused) | .scale, .x, .y, .height' | xargs)