Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 30, 2025

This is an automated PR to promote changes from rc to master.
Please review and test before merging.

See TESTING.md for complete testing instructions.

According to our release policy, this PR is expected to be merged on: 1st or 3rd Friday of the month
Testers are encouraged to test the changes before merging.
Please note that this schedule may be adjusted based on the needs of the project.


  • chore Merge branch 'rc' of https://github.com/HyDE-Project/HyDE into rc (342f4f3) by kRHYME7
  • chore minor fixes (999b8d6) by kRHYME7
  • chore Merge branch 'master' into rc (b0c7609) by Khing
  • chore Merge branch 'master' into rc (ca5272d) by Khing
  • chore Update Configs/.local/lib/hyde/wallpaper.hyprpaper.sh (4b54fe4) by Khing
  • chore cap cpu temp color to 100 (c0aee7e) by kRHYME7
  • chore Update Configs/.local/lib/hyde/cpuinfo.sh (ff1bcf5) by Khing
  • chore Update Configs/.local/lib/hyde/gpuinfo.sh (21b12ea) by Khing
  • chore chore: Release - dev → rc (chore: Release - dev → rc #1494) (226427f) by github-actions[bot]
  • feat: Expose cpuinfo's and gpuinfo's css class (cd0d4a8) by kRHYME7
  • chore Merge branch 'master' into rc (720ebe2) by Khing
  • chore Merge branch 'master' into rc (afb9df0) by Khing
  • chore Merge branch 'master' into rc (9ae562c) by Khing
  • chore Merge branch 'master' into rc (b543789) by Khing
  • chore pr (c8490b7) by kRHYME7
  • chore Merge branch 'master' into rc (be440a6) by Khing

Please review the changes carefully before merging.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

Changes refactor CPU and GPU info display from hardcoded color logic to CSS class-based styling. Scripts now emit JSON with computed temperature and utilization class names instead of color values. New CSS files define colors and font-weights for temperature and utilization buckets. Wallpaper script adds branching logic for HYPRLAND detection.

Changes

Cohort / File(s) Summary
Core info script refactoring
Configs/.local/lib/hyde/cpuinfo.sh, Configs/.local/lib/hyde/gpuinfo.sh
Removed get_temp_color function; replaced with inline CSS class computation for temperature and utilization buckets. JSON output now includes class (array of class names), percentage, and alt fields for CSS-based styling instead of embedded colors. Temperature extracted using Perl (cpuinfo) or computed directly; both scripts apply numeric bucketization (0–999 for temp, 0–100 for util).
CSS styling definitions
Configs/.local/share/waybar/styles/classes/cpuinfo.css, Configs/.local/share/waybar/styles/classes/gpuinfo.css
New CSS rule sets defining color mappings for temperature buckets (temp-0 through temp-100 in 5°C increments) and font-weight mappings for utilization buckets (util-0 through util-100).
CSS import updates
Configs/.local/share/waybar/styles/defaults.css
Added imports for new classes/cpuinfo.css and classes/gpuinfo.css stylesheets under new "classes" section.
Wallpaper script branching
Configs/.local/lib/hyde/wallpaper.hyprpaper.sh
Added conditional branch based on HYPRLAND_INSTANCE_SIGNATURE: if set, uses hyprctl; otherwise writes hyprpaper config file and manages systemd service or creates unit via app2unit.sh.
Documentation and formatting
CHANGELOG.md, Configs/.local/lib/hyde/screenshot.sh
CHANGELOG.md: Added "Upcoming Release" section noting cpuinfo/gpuinfo now use CSS classes. screenshot.sh: Whitespace and quoting adjustments with no behavioral impact.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰✨ Colors now dance as classes in CSS,
No more hardcoded hues—what bliss!
Temp and util buckets cascade with grace,
Styling logic finds its proper place.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore: Release - rc → master' accurately describes the main purpose: promoting changes from rc branch to master as an automated release, which aligns with the PR's primary objective.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@kRHYME7
Copy link
Contributor

kRHYME7 commented Jan 2, 2026

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (5)
Configs/.local/lib/hyde/wallpaper.hyprpaper.sh (1)

29-33: Add error handling for service management operations.

The service management logic lacks error handling. Consider adding checks and user notifications for failures:

  • The systemctl --user restart command could fail
  • The app2unit.sh script might not exist or could encounter errors
  • Users won't be notified if wallpaper setup fails
🔎 Proposed enhancement with error handling
     if systemctl --user is-active --quiet hyprpaper.service; then
-        systemctl --user restart hyprpaper.service
+        if ! systemctl --user restart hyprpaper.service; then
+            print_log -sec "wallpaper" -stat "error" "Failed to restart hyprpaper.service"
+            exit 1
+        fi
     else
-        app2unit.sh -- hyprpaper --config "$XDG_STATE_HOME/hyde/hyprpaper.conf"
+        if ! command -v app2unit.sh &>/dev/null; then
+            print_log -sec "wallpaper" -stat "error" "app2unit.sh not found"
+            exit 1
+        fi
+        if ! app2unit.sh -- hyprpaper --config "$XDG_STATE_HOME/hyde/hyprpaper.conf"; then
+            print_log -sec "wallpaper" -stat "error" "Failed to create hyprpaper unit"
+            exit 1
+        fi
     fi
Configs/.local/share/waybar/styles/classes/cpuinfo.css (1)

13-15: Consider reordering selectors for readability.

The selectors are listed as temp-25, temp-35, temp-30 instead of sequential order. While functionally correct, reordering to temp-25, temp-30, temp-35 would improve readability.

🔎 Suggested reordering
-#custom-cpuinfo.temp-25,
-#custom-cpuinfo.temp-35,
-#custom-cpuinfo.temp-30 {
+#custom-cpuinfo.temp-25,
+#custom-cpuinfo.temp-30,
+#custom-cpuinfo.temp-35 {
     color: #87ceeb;
 }
Configs/.local/share/waybar/styles/classes/gpuinfo.css (1)

13-15: Consider reordering selectors for readability.

The selectors are listed as temp-25, temp-35, temp-30 instead of sequential order. While functionally correct, reordering to temp-25, temp-30, temp-35 would improve readability and consistency with expected numerical ordering.

🔎 Suggested reordering
-#custom-gpuinfo.temp-25,
-#custom-gpuinfo.temp-35,
-#custom-gpuinfo.temp-30 {
+#custom-gpuinfo.temp-25,
+#custom-gpuinfo.temp-30,
+#custom-gpuinfo.temp-35 {
     color: #87ceeb;
 }
Configs/.local/lib/hyde/gpuinfo.sh (2)

152-167: LGTM! CSS class computation logic is correct.

The temperature and utilization bucketing logic correctly computes CSS classes for styling:

  • Temperature: 5°C buckets (temp-0, temp-5, ..., temp-995)
  • Utilization: 10% buckets (util-0, util-10, ..., util-100)
  • Bounds checking prevents invalid values
Optional: Add braces for consistency

For consistency with other variable expansions in this block, consider adding braces:

-    local util_val=${utilization%.*}
+    local util_val=${utilization%%.*}

Note: Also changed %.* to %%.* to handle edge cases where multiple dots might exist (though unlikely in this context).


168-189: Manual JSON construction is acceptable but consider using jq for safety.

The JSON output now includes CSS classes, percentage, and alt fields as intended. While manual string concatenation works here since values are controlled, using jq would provide better safety against special characters.

Optional: Consider using jq for JSON construction

For more robust JSON construction, consider using jq:

jq -nc \
  --arg text "$thermo $temperature°C" \
  --arg tooltip "$full_tooltip_text" \
  --arg temp_class "$temp_class" \
  --arg util_class "$util_class" \
  --argjson percentage "$temp_pct" \
  --arg alt "$temp_bucket" \
  '{text: $text, tooltip: $tooltip, class: [$temp_class, $util_class], percentage: $percentage, alt: $alt}'

This eliminates potential issues with special characters in values.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7101bf1 and cd0d4a8.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • Configs/.local/lib/hyde/cpuinfo.sh
  • Configs/.local/lib/hyde/gpuinfo.sh
  • Configs/.local/lib/hyde/screenshot.sh
  • Configs/.local/lib/hyde/wallpaper.hyprpaper.sh
  • Configs/.local/share/waybar/styles/classes/cpuinfo.css
  • Configs/.local/share/waybar/styles/classes/gpuinfo.css
  • Configs/.local/share/waybar/styles/defaults.css
🧰 Additional context used
🧬 Code graph analysis (1)
Configs/.local/lib/hyde/screenshot.sh (2)
Configs/.local/lib/hyde/fastfetch.sh (1)
  • USAGE (7-18)
Configs/.local/lib/hyde/screenrecord.sh (1)
  • USAGE (11-42)
🪛 Shellcheck (0.11.0)
Configs/.local/lib/hyde/gpuinfo.sh

[warning] 219-219: cpuinfo_file is referenced but not assigned (did you mean 'gpuinfo_file'?).

(SC2154)

🔇 Additional comments (5)
Configs/.local/lib/hyde/wallpaper.hyprpaper.sh (1)

17-17: LGTM! Good refactor to use the variable.

Using ${cached_thumb} instead of hardcoding the path improves maintainability and consistency.

CHANGELOG.md (1)

9-16: LGTM! Clear documentation of the CSS class-based styling change.

The changelog entry accurately describes the shift from hardcoded colors to CSS classes for CPU and GPU info, which aligns with the code changes in this PR.

Configs/.local/lib/hyde/screenshot.sh (1)

8-8: LGTM! Cosmetic formatting improvements.

These changes improve code consistency without altering functionality:

  • Heredoc delimiter formatting standardized
  • Whitespace normalized around redirects
  • Case statement formatting cleaned up

Also applies to: 55-55, 117-123

Configs/.local/lib/hyde/cpuinfo.sh (1)

65-94: LGTM! Robust Perl-based JSON parsing implementation.

The Perl script correctly:

  • Implements a fallback chain for JSON parsers (Cpanel::JSON::XS → JSON::XS → JSON::PP)
  • Extracts temperature data from multiple chip types (coretemp, k10temp, zenpower)
  • Handles missing data gracefully with fallback logic on lines 96-102
Configs/.local/share/waybar/styles/defaults.css (1)

15-18: LGTM! The new CSS imports follow the existing pattern and the referenced files exist in the repository.

github-actions bot and others added 9 commits January 2, 2026 16:39
* Modify update instructions

Replaced git pull with git fetch --depth 1 and git reset --hard to maintain a shallow clone

* docs: Update README.es.md and fix translations

updated the Spanish README to follow the same format as the README,
translated the new content, and corrected some translations that sounded
odd.

* docs: Forgot to translate an animated subtitle

* docs: Small correction

* docs: Fix broken assets

* docs: Fix incorrect path

* docs: Resolve bot's nitpicks

* docs: Add warning about uncommited changes

* docs: Add git fetch safeguard

---------

Co-authored-by: NeatTaken <137969671+NeatTaken@users.noreply.github.com>
Co-authored-by: Khing <53417443+kRHYME7@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants