Repository navigation
Lua autostart apps still get HL_INITIAL_WORKSPACE_TOKEN, exec-once doesn't
#16137
Replies: 1 comment 3 replies
|
can i ban him pls |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hyprland version
v0.56.2
Is this a regression?
Sort of. With
exec-oncein hyprland.conf this was fine. 0.55 moved process spawning into the new Executor and lost theexec-onceexception; #15395 (0.56.0) put it back, but only for the legacyexec-oncepath.What's the bug?
Anything started with
hl.exec_cmd()insidehl.on("hyprland.start", ...)getsHL_INITIAL_WORKSPACE_TOKEN. The same command as exec-once in a .conf does not.With the default
misc.initial_workspace_tracking = 1that means an autostarted app whose window shows up within 10 s (and has no workspace rule) gets pulled to the workspace that was active at the first frame, even if I already moved somewhere else.Cause, as far as I can tell:
m_isLaunchingExecOnceis only set around the legacyexec-onceloop. The Lua hyprland.start event is fired from its own listener, so by then the flag is false again.Workaround I use:
hl.exec_cmd("unset HL_INITIAL_WORKSPACE_TOKEN; " .. cmd)Reproduction steps
Run nested inside a session, with
env -u HL_INITIAL_WORKSPACE_TOKENso the outer token is not inherited.hyprland.lua:
hyprland.conf
Result
env-lua.txthasHL_INITIAL_WORKSPACE_TOKEN=<uuid>,env-conf.txtisempty.All reactions