Hi all,
I use XMonad and I have it configured so that the command discord --start-minimized
is run once on session start (spawnOnce "discord --start-minimized"
is a part of my startupHook
, for those familiar with XMonad).
This works fine and a Discord icon is present and functional in my systray. However, when I run the Discord desktop entry via Rofi, a new Discord process is started i.e. a whole new window opens, I get a duplicate icon in my taskbar, and a new entry in my process manager.
Expected behaviour is that Discord recognizes that there's a preexisting process, brings it to focus, and then dies rather than spawning a new, redundant process. Indeed, this works when I am spawning Discord via Rofi or my terminal. The unintended behaviour only occurs when Discord is launched on session start via XMonad.
I have confirmed that there is only one Discord executable in my PATH (and on my system as a whole). I have confirmed that nowhere (including its desktop entry) do I call Discord with the --multi-instance
flag. Inspecting the processes the only difference /appears/ to be that the original process has its parent listed as XMonad whereas any subsequent process launched via Rofi has its parent as systemd and any subsequent process launched via my terminal has its parent process as Fish (my shell). Notably, Discord instances launched via Fish and systemd can recognize one another in the way I expect.
Does anyone have any ideas for something I could try to get my desired behaviour i.e. launch Discord minimized on start-up via XMonad but be able to open the window of the pre-existing process via a Desktop entry in Rofi?
Thank you for reading.
EDIT:
Forgot to add that all aforementioned processes belong to my 'user' i.e. none of them are being run as root.
I have to admit that regardless of her ugly politics I always thought she was attractive but evil cartoon witches being mean to me is hot in my book so maybe you've squared this circle for me.