Comment by iLemming
I have done that for awesomewm https://github.com/agzam/awesomewm.d/blob/main/src/emacs.fnl
I'm not using it anymore though. I moved to Hyprland. I built my config in Clojure, but I need to fix a few things before making the repo public.