Skip to content

#1889 fix: point shipped callers at files that still exist - #1890

Open
RAprogramm wants to merge 1 commit into
HyDE-Project:devfrom
RAprogramm:1889
Open

#1889 fix: point shipped callers at files that still exist#1890
RAprogramm wants to merge 1 commit into
HyDE-Project:devfrom
RAprogramm:1889

Conversation

@RAprogramm

@RAprogramm RAprogramm commented Jul 30, 2026

Copy link
Copy Markdown

Closes #1889

Hard failures

hyde-shell themeswitch did not exist. themeswitch.sh was deleted by 6eb07e2d and Scripts/migrations/v26.7.4.sh:35 retires the leftover, and hyde-shell has no alias table — run_command tries .lua, .sh, .py, executable — so every call hard-failed. Repointed at theme.switch in Configs/.local/share/waybar/modules/custom-theme.jsonc, modules/custom-hyde-menu.jsonc, layouts/macos.jsonc, and at theme.switch.sh in Configs/.local/lib/hyde/wallpaper.kon.sh (reachable from Dolphin's "Set As Wallpaper", shipped by Scripts/dots/dolphin.toml:11-19).

The config editor created dead files. config-registry.toml offered hypr/{userprefs,keybindings,windowrules,nvidia}.conf, none of which anything loads. hydectl flags a missing entry in the list, but config.EditConfigFile runs ExpandPathos.MkdirAll$EDITOR without stat'ing the target, so accepting one created the directory and, on save, a file Hyprland never reads. The four entries collapse into one pointing at ${XDG_CONFIG_HOME}/hypr/hyprland.lua, which is where user overrides actually belong (Scripts/dots/hyprland.toml:23-27, preserve).

Environment variable

The deployed entry point is ${XDG_DATA_HOME}/hypr/hyde.lua (Scripts/dots/hyprland.toml:11-16). Configs/.config/fish/conf.d/hyde.fish:77 exported a .conf deleted by the Lua release, and Configs/.config/uwsm/env-hyprland.d/00-hyde.sh:28 defaulted to hypr/hyprland.lua, which no dot deploys. Fish now walks the same candidate list as shell/activate:49-61, and uwsm defaults to hyde.lua.

Both were scoped rather than fatal — 00-hyde.sh sources activate first, and activate resets HYPRLAND_CONFIG before setting it — so this bites the session that never activates, the case in discussion #1849, where the reporter quotes the fish line and the maintainer answers -c $XDG_DATA_HOME/hypr/hyde.lua. It also fed the "${HYPRLAND_CONFIG##*.}" == "lua" branches in theme.switch.sh:126-141, color.set.sh:7 and color/hypr.sh:208.

System monitor

system.monitor.sh:63, reachable from CTRL + SHIFT + ESCAPE, read the terminal out of the deleted ~/.config/hypr/keybindings.conf — and $term was first assigned on that very line, so the pattern was a bare ^\s* and the grep never meant anything even before the deletion. Removed. The documented fallback did not exist either: SYSMONITOR_TERMINAL appeared only in the script's show_help, so terminal is now declared in schema/config.toml and schema/schema.toml. With neither that nor TERMINAL set the script warns and moves to the next candidate instead of launching a console monitor with no terminal attached.

Dead code

hyde-launch.sh:6 called the deleted open.sh; it now calls hyde-shell open. Nothing in the tree invokes hyde-launch — a full grep finds only its own deprecation notice — so this is cosmetic; deleting the file instead would be equally correct.

keybinds_hint.sh:6-7 seeded kb_hint_conf from three deleted .conf paths and never read the variable again; ROFI_KEYBIND_HINT_CONFIG appears nowhere else. The hint reads live binds via keybinds/hint-hyprland.py, so the assignment and the two variables feeding it are gone. Note #1826 and #1775 also touch this file; the removed lines are not the ones they edit.

Deliberately not touched

globalcontrol.sh:335-340 and luautils/theme/parser.lua:134-141 still list ${XDG_DATA_HOME}/hyde/{hyde,hyprland}.conf among six default-config paths. Those two are no longer deployed, but the primary source $HYDE_THEME_DIR/hypr.theme still answers and the six-path grep is a last resort that now returns empty rather than failing — and a user may legitimately keep their own copy there. Left for a separate decision.

Configs/.local/lib/hyde/grimblast is referenced by nothing: screenshot.sh and screenrecord.sh both invoke $LIB_DIR/hyde/screenshot/grimblast, the vanilla copy the [grimblast] dot downloads. Worth noting because #1877 fixes the double selection in the in-repo file, which nothing runs — the live bug is in the downloaded script.

Tests

tests/test_references.sh (new) fails on the pre-change tree with 14 failures and passes after: it rejects any shipped config referencing hyde-shell themeswitch, themeswitch.sh, hyde/open.sh or the four retired hypr/*.conf paths, asserts the Lua entry point exists, and requires every shell integration that sets HYPRLAND_CONFIG to point at hypr/hyde.lua. The legacy Scripts/restore_cfg.* pair is out of scope, documented in the test.

Full suite: 9 cases, 0 failed.

Summary by CodeRabbit

  • Bug Fixes

    • Restored theme switching from Waybar and Dolphin wallpaper actions.
    • Fixed Fish sessions launched outside UWSM by correcting Hyprland configuration detection.
    • Updated the Hyprland config editor to show the readable Lua configuration.
    • Prevented the system monitor from launching without an available terminal.
    • Updated Hyprland configuration references for the Lua-based setup.
  • New Features

    • Added a configurable terminal setting for console-based system monitoring.
  • Tests

    • Added checks to detect outdated configuration references and validate Lua configuration paths.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3296f770-0458-4b37-bb0a-6a8d575fcb00

📥 Commits

Reviewing files that changed from the base of the PR and between bab9fcf and 701e1b4.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • Configs/.config/fish/conf.d/hyde.fish
  • Configs/.config/uwsm/env-hyprland.d/00-hyde.sh
  • Configs/.local/lib/hyde/hyde-launch.sh
  • Configs/.local/lib/hyde/keybinds_hint.sh
  • Configs/.local/lib/hyde/system.monitor.sh
  • Configs/.local/lib/hyde/wallpaper.kon.sh
  • Configs/.local/share/hyde/config-registry.toml
  • Configs/.local/share/hyde/schema/config.toml
  • Configs/.local/share/hyde/schema/schema.toml
  • Configs/.local/share/waybar/layouts/macos.jsonc
  • Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc
  • Configs/.local/share/waybar/modules/custom-theme.jsonc
  • tests/test_references.sh
💤 Files with no reviewable changes (1)
  • Configs/.local/lib/hyde/keybinds_hint.sh

📝 Walkthrough

Walkthrough

The PR updates HyDE’s Lua configuration references, replaces retired theme and launch commands, removes obsolete keybind configuration paths, adds system monitor terminal configuration, and introduces tests for stale references.

Changes

Lua migration cleanup

Layer / File(s) Summary
Configuration contracts and validation
Configs/.local/share/hyde/config-registry.toml, Configs/.config/fish/..., Configs/.config/uwsm/..., tests/test_references.sh
Hyprland integrations and registry entries now target hypr/hyde.lua, while tests detect retired references and invalid HYPRLAND_CONFIG values.
Shell and theme dispatch cleanup
Configs/.local/lib/hyde/..., Configs/.local/share/waybar/...
Launch, wallpaper, and Waybar commands use current hyde-shell subcommands; obsolete keybind configuration paths are removed.
System monitor terminal handling
Configs/.local/lib/hyde/system.monitor.sh, Configs/.local/share/hyde/schema/...
System monitor configuration adds a terminal setting and skips direct launches when no terminal is configured.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

Suggested labels: bug

Suggested reviewers: krhyme7

Poem

A bunny found old paths in the hay,
And hopped them all neatly away.
Lua now leads,
Themes switch with speed,
While terminals wait for their day.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: updating shipped callers to reference files that still exist.
Linked Issues check ✅ Passed The PR addresses the linked bug by fixing broken theme, config, env, monitor, and dead-file references.
Out of Scope Changes check ✅ Passed No clear unrelated changes appear; the edits and test all support the shipped-reference cleanup.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant