Instead of using the obsolete exwm-config in your init.el, we recommend to
create a custom configuration tailored to your needs. The old exwm-config file
and the EXWM wiki serve as starting points. The minimal configuration to get
EXWM working is as follows:
(require 'exwm)
(setq exwm-input-global-keys `(([?\s-r] . exwm-reset)))
(exwm-enable)
In addition you may want to customize `exwm-workspace-number',
`exwm-input-global-keys' and `exwm-input-simulation-keys'. In order to rename
EXWM buffers, such that they match the window class or window title, add custom
hooks to `exwm-update-title-hook' and `exwm-update-class-hook', for example:
(add-hook 'exwm-update-class-hook
(lambda () (exwm-workspace-rename-buffer exwm-class-name)))
* exwm-config.el: Drop obsolete file.
Othewise, we won't be able to delete the frame (frames with surrogate
minibuffers cannot be deleted).
* exwm-workspace.el
(exwm-workspace-delete): Transfer surrogate minibuffers to the next
workspace before attempting to delete a workspace (part of #64).
(exwm-workspace--prompt-delete): Use `exwm-workspace-delete' instead of
directly calling `delete-frame'.
Previously, EXWM would leave the inner window behind when dragging
around floating windows until the mouse was released. Now, the inner
window will be dragged along without any lag.
* exwm-floating.el (exwm-floating--do-moveresize): drag the inner window
along with the outer window.
`cl-case' matches symbols directly but xcb:randr:Notify:* are variables. This likely never worked.
* exwm-randr.el (exwm-randr--on-Notify): replace cond with cl-case.
Previous behavior required explicitly passing an ID when called from lisp
programs. New behavior attempts to set the ID to window-buffer when not
explicitly passed as an argument. A user-error is thrown if current-buffer has
no X window ID.
See: https://github.com/emacs-exwm/exwm/issues/60
The example configuration should not be used directly. Instead copy the
relevant settings to your X initialization script. See #57.
* xinitrc: Print warning when used.
The sequence number tracks how many request's we've sent, the config
timestamp tracks the last time the screen configuration was changed. The
previous logic only worked because we tended to send a lot of X messages
between screen change events, but that's no longer the case now that
we're using a different connection.
* exwm-randr.el (exwm-randr--prev-screen-change-timestamp): rename
`sequence` to `timestamp`.
(exwm-randr--on-ScreenChangeNotify): use `config-timestamp` instead of
`~sequence`.
And make enabling it idempotent (part of #47).
* exwm-randr.el (exwm-randr--connection): create a separate connection
variable for EXWM randr, following up from this [1] GitHub discussion.
(*): switch to the new variable.
(exwm-randr--assert-connected): a new function to assert that randr is
enabled & connected (for interactive commands).
(exwm-randr-refresh): use the aformentioned function.
(exwm-randr-mode, exwm-randr-enable): move these to the top so we can
reference the mode variable.
[1]: https://github.com/emacs-exwm/exwm/pull/48#discussion_r1626741032
The example configuration should not be loaded directly. Instead copy the
relevant settings to your user configuration. Fix#57.
* exwm.el: Update commentary.
* exwm-config.el: Update commentary. Print warning when used.
(exwm-config-example, exwm-config-misc, exwm-config-ido): Mark as obsolete.
* exwm.el (exwm--client-message-functions):
Alist for dispatching client messages to handlers.
(exwm-init): set exwm--client-message-functions once exwmh support enabled.
(exwm--on-ClientMessage): delegate via exwm--client-message-functions,
decompose body into separate handlers.
See: https://github.com/ch11ng/exwm/issues/931
* exwm.el (exwm--on-ClientMessage): Handle the case where a window is
hidden but not iconic. This code would previously error in some cases
because a buffer wouldn't have an active window even when it was not in
the iconic state, likely due to a focus race somewhere.
fixes#28
* exwm-systemtray.el (xcb:systemtray:-ClientMessage): Remove class.
(exwm-systemtray--init): Use `xcb:icccm:-ManagerSelection' instead of
`xcb:systemtray:-ClientMessage'.
* exwm-xsettings.el (exwm-xsettings--init): Use `xcb:icccm:-ManagerSelection'
instead of `xcb:xsettings:-ClientMessage'.
Combine both focus update timers into one and ignore windows in "no
focus" frames.
* exwm-input.el
(exwm-input--on-buffer-list-update):
Avoid focusing windows in frames with the `no-accept-focus` frame
property.
(exwm-input--update-focus-defer-timer):
Remove the duplicate timer.
(exwm-input--update-focus-defer):
Use a single `exwm-input--update-focus-timer`.
(exwm-input--update-focus-commit):
Read `exwm-input--update-focus-window` instead of taking a window
as a parameter (this is what lets us combine the timers).
(exwm-input--update-focus-commit):
Use a let-bind instead of unwind-protect.
(exwm-input--exit):
Remove references to `exwm-input--update-focus-defer-timer`.
Otherwise `default-directory' could be /home/user instead of /home/user/ as is
expected by Emacs.
* exwm-manage.el (exwm-manage--update-default-directory): Use
`file-name-as-directory'.
* exwm-manage.el (exwm-manage--update-default-directory):
define a function to update the default-directory of an X window based on it's CID.
(exwm-manage--manage-window):
call `exwm-manage--update-update-default-directory` on manage (fixes#12).
All this logic runs in the context of the EXWM buffer. If there are
concerns about the X windows associating with a different buffer while
we're still trying to manage it, we probably have bigger problems.
* exwm-manage.el (exwm-manage--manage-window): assume that the current
buffer doesn't change.