exwm
exwm copied to clipboard
Opening new EXWM windows
The default behavior of EXWM opens a new buffer over whichever window is currently selected. How do I auto-split the current frame and place the new EXWM window there? I've tried adding a simple function to the exwm-manage-finish-hook
, but it tends to make the split and put the EXWM window in the wrong split.
Something like this in my config:
(add-hook 'exwm-manage-finish-hook (lambda () (split-window-right)))
EXWM tries to, so to say, extrapolate Emacs to a Window Manager. I suggest you try to implement the behaviour you want on bare Emacs and, hopefully, with EXWM it will also work for X-Windows. In this case, the simple way would be to create an interactive command that does what you want. The following seems to work:
(defun split-right-and-launch (command)
(interactive (list (read-shell-command "$ ")))
(split-window-right)
(other-window 1)
(start-process-shell-command command nil command))