Unset HL_INITIAL_WORKSPACE_TOKEN before dbus import to prevent lock#1783
Unset HL_INITIAL_WORKSPACE_TOKEN before dbus import to prevent lock#1783BigDawnGhost 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. |
📝 WalkthroughWalkthroughstartup.conf replaces the hardcoded exec-once command ChangesStartup DBUS initialization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerLet us write the prompt for your AI agent so you can ship faster (with fewer bugs). View plan for ticket: ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
Configs/.local/share/hypr/startup.conf (1)
7-7: 💤 Low valueConsider reformatting the lengthy inline comment.
The comment is very informative but exceeds 100 characters and contains multiple distinct pieces of information. Consider splitting it for better readability:
📝 Suggested comment reformatting
-exec-once = env -u HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --all #? Might fail so we hardcode the variables below; Hyprland 0.55+ injects HL_INITIAL_WORKSPACE_TOKEN into exec-once, unset it to prevent apps from locking to workspace 1 on first launch +# Hyprland 0.55+ injects HL_INITIAL_WORKSPACE_TOKEN into exec-once; unset it to prevent apps from locking to workspace 1 +exec-once = env -u HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --allAlternatively, keep it inline but split into two parts:
-exec-once = env -u HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --all #? Might fail so we hardcode the variables below; Hyprland 0.55+ injects HL_INITIAL_WORKSPACE_TOKEN into exec-once, unset it to prevent apps from locking to workspace 1 on first launch +exec-once = env -u HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --all +# Note: Might fail so we hardcode variables below; Hyprland 0.55+ token unset prevents workspace 1 lock🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Configs/.local/share/hypr/startup.conf` at line 7, The long inline comment on the exec-once line should be split into two or more shorter '#' comments to improve readability and keep each under ~100 characters; update the line containing exec-once = env -u HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --all so the actionable command stays unchanged and add one comment explaining why HL_INITIAL_WORKSPACE_TOKEN is unset and a second comment noting Hyprland 0.55+ injects that token and the fallback/hardcode rationale, each comment referencing HL_INITIAL_WORKSPACE_TOKEN and Hyprland for clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Configs/.local/share/hypr/startup.conf`:
- Line 7: The long inline comment on the exec-once line should be split into two
or more shorter '#' comments to improve readability and keep each under ~100
characters; update the line containing exec-once = env -u
HL_INITIAL_WORKSPACE_TOKEN dbus-update-activation-environment --systemd --all so
the actionable command stays unchanged and add one comment explaining why
HL_INITIAL_WORKSPACE_TOKEN is unset and a second comment noting Hyprland 0.55+
injects that token and the fallback/hardcode rationale, each comment referencing
HL_INITIAL_WORKSPACE_TOKEN and Hyprland for clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c0e3ee56-4efd-4042-847c-9e038df7731f
📒 Files selected for processing (1)
Configs/.local/share/hypr/startup.conf
|
ah, how about removing that line? I remembered using --all is bad in my latest branch. can you confirm it works by removing that line? |
I'm not sure what impact this will have, but after deleting that line and restarting the session everything works fine. |
Since Hyprland 0.55, exec-once commands inherit HL_INITIAL_WORKSPACE_TOKEN. 'dbus-update-activation-environment --systemd --all' imported it into the systemd user environment, so apps launched via systemd-run inherited the stale token and opened on workspace 1. Remove the --all import entirely: Hyprland's built-in systemd var import and the hardcoded $start.DBUS_SHARE_PICKER / $start.SYSTEMD_SHARE_PICKER lines below already cover the required variables, and UWSM sessions manage the environment themselves. Fixes HyDE-Project#1766 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
a15bf3b to
065001b
Compare
|
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. |
|
it's fine, using --all is not deterministic too. example this case good thing you debugged it lol. I remembered testing --all but forgot the exact decision why I added it. i thought it helped propagating dbus stuff but it got worst in my branch and remove it and actually found the real culprit on why waybar takes long time to load. |
|
spoiler alert it is due to resetxdgpodtal script. it shouldn't be run on start up lol. |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Description
Fixes #1766
Since Hyprland 0.55,
exec-oncecommands inheritHL_INITIAL_WORKSPACE_TOKEN(previously they did not in 0.54). HyDE runsdbus-update-activation-environment --systemd --allat startup, which imports this token into the systemd user environment. Subsequent app launches viahyde-shell app→systemd-runinherit the stale token, causing all windows to open on workspace 1.This PR adds
env -u HL_INITIAL_WORKSPACE_TOKENto strip the token before the dbus import, while keeping the original--allbehavior.See issue #1766 analysis for detailed root cause.
Type of change
Checklist
Summary by CodeRabbit