fix(hypr): align window/layer rules and source includes with latest syntax#1612
fix(hypr): align window/layer rules and source includes with latest syntax#1612NZ-247 wants to merge 1 commit into
Conversation
|
This PR is targeting According to our Quarterly Release Policy:
Required Action:
If this is an emergency fix, please add a comment explaining why it needs to target This is an automated message enforcing our quarterly release workflow. |
📝 WalkthroughWalkthroughThis pull request modernizes Hyprland configuration files by converting relative source paths to absolute $HOME-based paths, refactoring window rules from block-based to single-line syntax, and updating legacy boolean flags (true/false) to current format (on/off) across multiple configuration files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (4)
Configs/.local/share/hypr/hyprland.conf (1)
19-35: Consider extracting a shared base path variable for include lines.This removes repetition and lowers drift risk when include roots change again.
🧩 Optional refactor
+$HYPR_SHARED_PATH = $HOME/.local/share/hypr + -source = $HOME/.local/share/hypr/variables.conf +source = $HYPR_SHARED_PATH/variables.conf -source = $HOME/.local/share/hypr/migration.conf +source = $HYPR_SHARED_PATH/migration.conf -source = $HOME/.local/share/hypr/defaults.conf +source = $HYPR_SHARED_PATH/defaults.conf -source = $HOME/.local/share/hypr/windowrules.conf +source = $HYPR_SHARED_PATH/windowrules.conf -source = $HOME/.local/share/hypr/env.conf +source = $HYPR_SHARED_PATH/env.conf -source = $HOME/.local/share/hypr/dynamic.conf +source = $HYPR_SHARED_PATH/dynamic.conf -source = $HOME/.local/share/hypr/startup.conf +source = $HYPR_SHARED_PATH/startup.conf -source = $HOME/.local/share/hypr/finale.conf +source = $HYPR_SHARED_PATH/finale.confAlso applies to: 41-41, 50-50
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Configs/.local/share/hypr/hyprland.conf` around lines 19 - 35, Introduce a single reusable base variable (e.g., HYPR_BASE or HYPR_DIR) at the top of the config and replace repeated "source = $HOME/.local/share/hypr/..." include lines with "source = ${HYPR_BASE}/<file>" for each referenced file (variables.conf, migration.conf, defaults.conf, windowrules.conf, env.conf, dynamic.conf, etc.); update any other include lines elsewhere to use the same variable so the include root is declared once and all "source =" entries reference that variable.Configs/.local/share/hypr/windowrules.conf (1)
15-15: Remove duplicate regex alternative in floating-app matcher.
blueman-managerappears twice in the same alternation; dropping one keeps the rule easier to maintain.♻️ Suggested cleanup
-windowrule = tag +hyde_floating_apps, match:class ^(blueman-manager|pavucontrol-qt|com\.gabm\.satty|vlc|kvantummanager|qt[56]ct|nwg-(look|displays)|org\.kde\.ark|org\.pulseaudio\.pavucontrol|blueman-manager|nm-(applet|connection-editor)|org\.kde\.polkit-kde-authentication-agent-1|console-dropdown)$ +windowrule = tag +hyde_floating_apps, match:class ^(blueman-manager|pavucontrol-qt|com\.gabm\.satty|vlc|kvantummanager|qt[56]ct|nwg-(look|displays)|org\.kde\.ark|org\.pulseaudio\.pavucontrol|nm-(applet|connection-editor)|org\.kde\.polkit-kde-authentication-agent-1|console-dropdown)$🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Configs/.local/share/hypr/windowrules.conf` at line 15, The windowrule's match:class regex contains a duplicate alternation "blueman-manager"; update the pattern used by the windowrule (the match:class value) to remove the redundant "blueman-manager" alternative so each app appears only once, ensuring the alternation list (e.g., entries like pavucontrol-qt, com\.gabm\.satty, vlc, kvantummanager, qt[56]ct, nwg-(look|displays), org\.kde\.ark, org\.pulseaudio\.pavucontrol, nm-(applet|connection-editor), org\.kde\.polkit-kde-authentication-agent-1, console-dropdown) remains unchanged aside from dropping the duplicate.Configs/.config/hypr/workflows.conf (1)
17-18: Use$WORKFLOWS_PATHforsourceto avoid path drift.You already define the path in Line 17; sourcing that variable keeps one source of truth.
🔧 Suggested change
$WORKFLOWS_PATH = $HOME/.config/hypr/workflows/default.conf -source = $HOME/.config/hypr/workflows/default.conf +source = $WORKFLOWS_PATH🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Configs/.config/hypr/workflows.conf` around lines 17 - 18, Replace the hardcoded path in the source assignment with the previously defined variable to keep a single source of truth: change the source line to reference $WORKFLOWS_PATH instead of the literal $HOME/.config/hypr/workflows/default.conf (the variable is defined as WORKFLOWS_PATH on the prior line).Configs/.config/hypr/animations.conf (1)
11-12: Reuse$ANIMATION_PATHinsourceto keep one path definition.This prevents future mismatch if the path is updated in one place only.
🔧 Suggested change
$ANIMATION_PATH=$HOME/.config/hypr/animations/theme.conf -source = $HOME/.config/hypr/animations/theme.conf +source = $ANIMATION_PATH🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Configs/.config/hypr/animations.conf` around lines 11 - 12, The file defines $ANIMATION_PATH but then duplicates the literal path in the source line; update the source line to reuse the variable by changing the source assignment to reference $ANIMATION_PATH (i.e., set source = $ANIMATION_PATH) so there is a single canonical path (watch for correct variable name casing and existing $ANIMATION_PATH definition).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Configs/.config/hypr/hyprland.conf`:
- Around line 23-26: Replace hardcoded include paths that reference
"$HOME/.config" (the lines beginning "source =
$HOME/.config/hypr/keybindings.conf", "source =
$HOME/.config/hypr/windowrules.conf", "source =
$HOME/.config/hypr/monitors.conf", and "source =
$HOME/.config/hypr/userprefs.conf") to use "$XDG_CONFIG_HOME" instead so the
config respects a custom XDG_CONFIG_HOME; update each "source =" line to
reference "$XDG_CONFIG_HOME/hypr/..." (ensure the variable is used consistently
like other files such as shaders.conf).
In `@Configs/.local/share/hyde/templates/hypr/windowrules.conf`:
- Line 80: The comment on the windowrule line referencing the app label is
misspelled; update the trailing comment on the rule "windowrule = float
on,match:class ^(com.github.unrud.VideoDownloader)$" to read
"VideoDownloader-Gtk" instead of "VideoDownloader-Gkk" so it matches the toolkit
naming used elsewhere.
---
Nitpick comments:
In `@Configs/.config/hypr/animations.conf`:
- Around line 11-12: The file defines $ANIMATION_PATH but then duplicates the
literal path in the source line; update the source line to reuse the variable by
changing the source assignment to reference $ANIMATION_PATH (i.e., set source =
$ANIMATION_PATH) so there is a single canonical path (watch for correct variable
name casing and existing $ANIMATION_PATH definition).
In `@Configs/.config/hypr/workflows.conf`:
- Around line 17-18: Replace the hardcoded path in the source assignment with
the previously defined variable to keep a single source of truth: change the
source line to reference $WORKFLOWS_PATH instead of the literal
$HOME/.config/hypr/workflows/default.conf (the variable is defined as
WORKFLOWS_PATH on the prior line).
In `@Configs/.local/share/hypr/hyprland.conf`:
- Around line 19-35: Introduce a single reusable base variable (e.g., HYPR_BASE
or HYPR_DIR) at the top of the config and replace repeated "source =
$HOME/.local/share/hypr/..." include lines with "source = ${HYPR_BASE}/<file>"
for each referenced file (variables.conf, migration.conf, defaults.conf,
windowrules.conf, env.conf, dynamic.conf, etc.); update any other include lines
elsewhere to use the same variable so the include root is declared once and all
"source =" entries reference that variable.
In `@Configs/.local/share/hypr/windowrules.conf`:
- Line 15: The windowrule's match:class regex contains a duplicate alternation
"blueman-manager"; update the pattern used by the windowrule (the match:class
value) to remove the redundant "blueman-manager" alternative so each app appears
only once, ensuring the alternation list (e.g., entries like pavucontrol-qt,
com\.gabm\.satty, vlc, kvantummanager, qt[56]ct, nwg-(look|displays),
org\.kde\.ark, org\.pulseaudio\.pavucontrol, nm-(applet|connection-editor),
org\.kde\.polkit-kde-authentication-agent-1, console-dropdown) remains unchanged
aside from dropping the duplicate.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
Configs/.config/hypr/animations.confConfigs/.config/hypr/hyprland.confConfigs/.config/hypr/windowrules.confConfigs/.config/hypr/workflows.confConfigs/.local/share/hyde/templates/hypr/windowrules.confConfigs/.local/share/hypr/hyprland.confConfigs/.local/share/hypr/windowrules.conf
| source = $HOME/.config/hypr/keybindings.conf | ||
| source = $HOME/.config/hypr/windowrules.conf | ||
| source = $HOME/.config/hypr/monitors.conf | ||
| source = $HOME/.config/hypr/userprefs.conf |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# First, check if the file exists and display lines 23-26
echo "=== Content at lines 23-26 of hyprland.conf ==="
if [ -f "Configs/.config/hypr/hyprland.conf" ]; then
sed -n '23,26p' "Configs/.config/hypr/hyprland.conf"
else
echo "File not found"
fi
echo
echo "=== All files in Configs/.config/hypr/ ==="
ls -la "Configs/.config/hypr/" 2>/dev/null || echo "Directory not found"
echo
echo "=== Checking for HOME-based includes across hypr config files ==="
find Configs/.config/hypr -name "*.conf" -type f 2>/dev/null | while read file; do
if rg -q '\$HOME/\.config' "$file"; then
echo "Found in: $file"
rg -n '\$HOME/\.config' "$file" || true
fi
done
echo
echo "=== Checking for XDG_CONFIG_HOME-based includes across hypr config files ==="
find Configs/.config/hypr -name "*.conf" -type f 2>/dev/null | while read file; do
if rg -q '\$XDG_CONFIG_HOME' "$file"; then
echo "Found in: $file"
rg -n '\$XDG_CONFIG_HOME' "$file" || true
fi
doneRepository: HyDE-Project/HyDE
Length of output: 2650
Use $XDG_CONFIG_HOME instead of hardcoding $HOME/.config in include paths.
Hardcoding $HOME/.config prevents configs from being found when users set a custom XDG_CONFIG_HOME. While $XDG_CONFIG_HOME defaults to $HOME/.config, respecting the environment variable is the proper approach. Note: other files in the directory already use $XDG_CONFIG_HOME (e.g., shaders.conf), so this change improves consistency.
Suggested adjustment
-source = $HOME/.config/hypr/keybindings.conf
-source = $HOME/.config/hypr/windowrules.conf
-source = $HOME/.config/hypr/monitors.conf
-source = $HOME/.config/hypr/userprefs.conf
+source = $XDG_CONFIG_HOME/hypr/keybindings.conf
+source = $XDG_CONFIG_HOME/hypr/windowrules.conf
+source = $XDG_CONFIG_HOME/hypr/monitors.conf
+source = $XDG_CONFIG_HOME/hypr/userprefs.conf🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Configs/.config/hypr/hyprland.conf` around lines 23 - 26, Replace hardcoded
include paths that reference "$HOME/.config" (the lines beginning "source =
$HOME/.config/hypr/keybindings.conf", "source =
$HOME/.config/hypr/windowrules.conf", "source =
$HOME/.config/hypr/monitors.conf", and "source =
$HOME/.config/hypr/userprefs.conf") to use "$XDG_CONFIG_HOME" instead so the
config respects a custom XDG_CONFIG_HOME; update each "source =" line to
reference "$XDG_CONFIG_HOME/hypr/..." (ensure the variable is used consistently
like other files such as shaders.conf).
| windowrule = float on,match:class ^(eog)$ # Imageviewer-Gtk | ||
| windowrule = float on,match:class ^(io.github.alainm23.planify)$ # planify-Gtk | ||
| windowrule = float on,match:class ^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk | ||
| windowrule = float on,match:class ^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk |
There was a problem hiding this comment.
Fix app label typo in comment.
Line 80 says VideoDownloader-Gkk; this should be VideoDownloader-Gtk for consistency with the app/toolkit naming used elsewhere.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Configs/.local/share/hyde/templates/hypr/windowrules.conf` at line 80, The
comment on the windowrule line referencing the app label is misspelled; update
the trailing comment on the rule "windowrule = float on,match:class
^(com.github.unrud.VideoDownloader)$" to read "VideoDownloader-Gtk" instead of
"VideoDownloader-Gkk" so it matches the toolkit naming used elsewhere.
Summary
This PR updates HyDE's Hyprland configuration templates to match the current unified
windowrule/layerrulesyntax used by recent Hyprland releases.The goal is to stop parse failures such as:
invalid field type idleinhibitinvalid field titleinvalid field float: missing a valueinvalid field blur: missing a valuesource= globbing error: found no matchWhat changed
1) Window rules syntax alignment
Updated window/layer rules to the current style in:
Configs/.config/hypr/windowrules.confConfigs/.local/share/hyde/templates/hypr/windowrules.confConfigs/.local/share/hypr/windowrules.confKey updates include:
windowrulev2-style/legacy patterns consolidated to currentwindowruleformat.match:class,match:title,match:tag,match:fullscreen,match:initial_title).float on,pin on,no_initial_focus on,keep_aspect_ratio on).idle_inhibitfullscreen rules adjusted to current filter usage (match:fullscreen 1).blur on,ignore_alpha 0,no_anim on).$&/overridestyle fragments).2)
sourcerobustness / globbing fixesUpdated includes to avoid relative/globbing failures in:
Configs/.config/hypr/hyprland.confConfigs/.config/hypr/animations.confConfigs/.config/hypr/workflows.confConfigs/.local/share/hypr/hyprland.confKey updates include:
sourcelines from relative paths (./...) to stable absolute/user-home based paths.Why this is needed
After newer Hyprland updates, users hit cascading parser errors from outdated field names/value forms and older include path assumptions. These changes align HyDE defaults/templates with current syntax and prevent first-run breakage after updates.
Scope and compatibility notes
Validation
Validated by reviewing all affected Hypr files for:
$&, old layer rule value-less forms),windowrule/layerrulevalue syntax,sourcepaths in critical entry templates.References
Summary by CodeRabbit