exwm icon indicating copy to clipboard operation
exwm copied to clipboard

Opening new EXWM windows

Open NickRaleigh opened this issue 2 years ago • 1 comments

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)))

NickRaleigh avatar Sep 29 '22 16:09 NickRaleigh

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))

medranocalvo avatar Nov 04 '22 23:11 medranocalvo