Wrong behavior when using sxhkd for launching programs
vacuumbeef opened this issue · comments
If you don't use key bindings in the spectrwm configuration file and instead rely on a key bindings daemon such as sxhkd, windows only open on the workspace that was active when you ran sxhkd.
So, for example, I'm on workspace 2. I run sxhkd and go to workspace 5. Then I press alt+f, which is bound to pcmanfm in the sxhkd configuration, pcmanfm opens on workspace 2, not the current workspace.
Relevant things mentioned here #508 but with terminals.
The programs started by sxhkd spawn in the same workspace since they inherit its env.
You can disable the spawn-in-workspace behavior by unsetting LD_PRELOAD
when you run the sxhkd daemon from spectrwm.
e.g. sh -c 'unset LD_PRELOAD; sxhkd'
Alternatively, you can start the daemon from your startup script (e.g. ~/.xinitrc or ~/.xprofile) instead of starting it from spectrwm.
See the SWMHACK
section of the manual added in spectrwm 3.5.1 for more details.