I am currently running Emacs as a desktop with EXWM. And I am trying to run some apps on startup to see them in a EXWM's systemtray:
(defun run-auto-start ()
(start-process-shell-command "pnmixer" nil "/bin/pnmixer")
(start-process-shell-command "nm-applet" nil "/bin/nm-applet"))
I have attached this function to exwm-init-hook
. But it seems that it is too early for a system tray to work properly, because sometimes these apps do not appear in a systemtray or only one of them does. (I initialize systemtray with (exwm-systemtray-enable)
before attaching the function to the hook) However if I evaluate those two lines manually after Emacs finished loading, pn-mixer
and nm-applet
immediately launch and go to the system tray.
So what is the last Emacs initialization hook I can use to execute my shell commands as late as possible to avoid running them manually? Maybe there is some hack to emulate this kind of "late hook"?..
P.S. I have tries after-init-hook
and emacs-startup-hook
none of them work well
nm-applet
from my.xsession
before firingemacs
and soexwm
. The app appears in theexwm
sys-tray just fine.exwm-systemtray-enable
) before you add your function toexwm-init-hook
and make sure that you add your function to the hook with aDEPTH
parameter of 100 to make sure that it is added after the systemtray init function thatexwm-systemtray-enable
adds. Check the value ofexwm-init-hook
to make sure you have done it correctly.