Skip to content

fix: correct hypridle dispatch syntax and swaybg path in hyprland configs#60

Closed
stanfish06 wants to merge 1 commit into
masterfrom
claude/nice-cori-Kgj0I
Closed

fix: correct hypridle dispatch syntax and swaybg path in hyprland configs#60
stanfish06 wants to merge 1 commit into
masterfrom
claude/nice-cori-Kgj0I

Conversation

@stanfish06
Copy link
Copy Markdown
Owner

Two bugs introduced in the May 15 hyprland Lua migration.

1. hyprland/hypridle.conf — wrong dispatch syntax (compatibility break)

hyprctl dispatch takes keyword-based commands (dpms off, dpms on), not Lua API expressions. The hl.dsp.dpms({...}) syntax only works inside hyprland.lua itself — passing it as a shell argument to hyprctl dispatch would silently fail, leaving DPMS non-functional.

-    after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "{enable}" })'
+    after_sleep_cmd = hyprctl dispatch dpms on
 ...
-    on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "{disable}" })'
-    on-resume  = hyprctl dispatch 'hl.dsp.dpms({ action = "{enable}" })'
+    on-timeout = hyprctl dispatch dpms off
+    on-resume  = hyprctl dispatch dpms on

2. hyprland/hyprland.lua — double -i typo + hardcoded repo path

The swaybg autostart line had -i swaybg -i Git/my-configs/img/bw_geometry.png — "swaybg" was being passed as the image path (copy-paste artifact from the command name), and the path assumed the repo is cloned at ~/Git/my-configs/.

-    hl.exec_cmd("swaybg -i swaybg -i Git/my-configs/img/bw_geometry.png -m fill & waybar")
+    hl.exec_cmd("swaybg -i ~/.config/hypr/wallpaper.jpg -m fill & waybar")

~/.config/hypr/wallpaper.jpg is a stable, location-independent path. Wire it up once at deploy time:

ln -sf ~/Git/my-configs/img/bw_geometry.png ~/.config/hypr/wallpaper.jpg

(Same pattern used in PR #47 for the i3 wallpaper path.)

Test plan

  • hyprctl dispatch dpms off — display turns off
  • hyprctl dispatch dpms on — display turns on
  • hypridle running — display turns off after 10 min idle
  • Hyprland starts with wallpaper after symlinking ~/.config/hypr/wallpaper.jpg

https://claude.ai/code/session_01ME1dkChBv2iqPdD1ZGPoVz


Generated by Claude Code

…figs

hyprland/hypridle.conf: `hyprctl dispatch 'hl.dsp.dpms({...})'` passes
Lua API syntax as a shell argument — hyprctl dispatch only accepts keyword
commands. Replace with `hyprctl dispatch dpms off/on`.

hyprland/hyprland.lua: swaybg autostart had a double `-i swaybg -i ...`
typo and hardcoded `Git/my-configs/` path. Use stable `~/.config/hypr/wallpaper.jpg`
(symlink once at deploy time: `ln -sf ~/Git/my-configs/img/bw_geometry.png ~/.config/hypr/wallpaper.jpg`).

https://claude.ai/code/session_01ME1dkChBv2iqPdD1ZGPoVz
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