Commit graph

630 commits

Author SHA1 Message Date
Daniel Mendler
956e7eb175
Depend on xelb 0.19 2024-05-23 19:19:19 +02:00
Daniel Mendler
9b130b2e9a
; Fix single quote docstring warning
* exwm-input.el (exwm-input-prefix-keys): Fix docstring.
2024-05-17 11:28:28 +02:00
Steven Allen
236f3ca467
Correctly activate windows even if they're not in the iconic state (#32)
* 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
2024-04-03 14:08:39 -07:00
Daniel Mendler
bf921084b4
; Make more lambdas visible to the byte compiler
* exwm-core.el (exwm-mode-menu), exwm-floating.el (exwm-floating-border-width):
  Make lambdas visible to the byte compiler.
2024-03-16 17:40:11 +01:00
Daniel Mendler
0ef8e04f27
exwm-mode-menu: Make lambdas visible to the byte compiler
* exwm-core.el (exwm-mode-menu): Use quasi quoting. Make lambdas visible to the
  byte compiler.
2024-03-16 17:02:11 +01:00
Daniel Mendler
a959f91c75
Move evaluated mode-name expression to exwm--mode-name
* exwm-core.el (exwm--mode-name): New function.
  (exwm-mode): Use it.
2024-03-16 16:55:37 +01:00
Daniel Mendler
61d97532fa
exwm-mode: Disable command, abbrev and syntax table
* exwm-core.el (exwm-mode): Disable :interactive, :syntax-table and
  :abbrev-table.
2024-03-16 14:37:16 +01:00
Daniel Mendler
99442909be
window-pixel-width-before-size-change is available since Emacs 26
* exwm-layout.el (exwm-layout--init, exwm-layout--exit): Remove fboundp check.
2024-03-15 19:08:00 +01:00
Daniel Mendler
1ebd135f45
window-preserve-size is available since Emacs 25
* exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Remove fboundp check.
2024-03-15 19:07:45 +01:00
Daniel Mendler
182102767e
Use xcb:icccm:-ManagerSelection (#16)
* 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'.
2024-02-12 23:55:19 +01:00
Steven Allen
a6e66f5e33
Simplify and improve focus handling (#10)
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`.
2024-02-05 07:32:51 -08:00
Daniel Mendler
44e74bcc07
Ensure that default-directory is a directory name in EXWM buffers.
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'.
2024-02-04 22:39:06 +01:00
Steven Allen
fbc1e81ed6
Set the EXWM buffer's default directory to match the process's CWD (#14)
* 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).
2024-02-04 12:57:58 -08:00
Steven Allen
c2856d15e8
Remove redundant with-current-buffer in manage-window (#13)
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.
2024-02-04 12:49:33 -08:00
Steven Allen
2bb9a5787e Use '=' instead of 'eq' to compare numbers.
* exwm.el (exwm--update-desktop):
* exwm-layout.el (exwm-layout--hide):
  Use `=` instead of `eq` for numeric comparison.
2024-01-24 06:05:33 +01:00
Steven Allen
0e365a0058 Use color-values instead of x-color-values
* exwm-core.el (exwm--color->pixel): Use `color-values` (introduced in
  Emacs 21) instead of `x-color-values` (deprecated in Emacs 30).
2024-01-24 05:48:08 +01:00
Daniel Mendler
089e0c8683 Move xsettings classes to xelb 2024-01-15 20:30:50 +01:00
Daniel Mendler
eb28ebf165
; README: Refer to the user guide for installation instructions 2024-01-14 12:32:02 +01:00
Daniel Mendler
5acb8bea8a
New customization group exwm-xsettings
* exwm-xsettings.el (exwm-xsettings): New customization group.
2024-01-14 01:07:39 +01:00
Daniel Mendler
c033fc00f3
New customization group exwm-debug
The group was already used, but the docstring was missing.

* exwm-core.el (exwm-debug): New customization group.
2024-01-14 01:07:33 +01:00
Daniel Mendler
f3c03ebbc3
; README: Fix feature list formatting 2024-01-13 20:43:00 +01:00
Daniel Mendler
8980c03a6b
; Commentary: Update list of features 2024-01-13 20:38:09 +01:00
Steven Allen
ff4edaab89 Implement the XSETTINGS protocol
Users can use this to configure system-wide themes, icons, fonts, etc.

* exwm-xsettings.el: Implement the XSETTINGS protocol (fixes
https://github.com/ch11ng/exwm/issues/876)
2024-01-13 20:23:55 +01:00
Daniel Mendler
c573ff143a Drop :version keywords from defgroup
These may refer to an Emacs version and may have been added by mistake.
2024-01-13 20:23:24 +01:00
Daniel Mendler
96a9de8c19 Depend on Emacs 27.1
Emacs 27.1 is widely available on all major Linux distributions, including the
ones with long time support.
2024-01-13 20:23:24 +01:00
Daniel Mendler
4a3feec76f
; Add LICENSE to .elpaignore 2024-01-12 15:01:18 +01:00
Daniel Mendler
588cfc7790
Add new maintainers: Steven Allen (@stebalien) and Daniel Mendler (@minad) 2024-01-12 11:10:48 +01:00
Daniel Mendler
2c5dcadfab
; Update repository URLs 2024-01-12 10:28:23 +01:00
Daniel Mendler
dc26c38af7
Remove obsolete functions and variables
These functions and variables have been marked as obsolete over five years ago.

* exwm-input.el (exwm-input-set-simulation-keys): Remove obsolete function.
* exwm-randr.el (exwm-randr--refresh, exwm-randr-workspace-output-plist): Remove
obsolete aliases.
2024-01-12 10:15:15 +01:00
Daniel Mendler
c069e8195d
exwm-blocking-subrs: x-* functions may be missing on some Emacs builds
Avoid compiler warnings. Follow-up of https://github.com/ch11ng/exwm/pull/937.
2024-01-12 10:10:30 +01:00
Daniel Mendler
2e79830e39
; First line of docstring should be a full sentence 2024-01-12 10:07:08 +01:00
Daniel Mendler
22aa38b0cd
; Use two spaces after sentence
I follow this convention in Elisp files only.
2024-01-12 10:07:04 +01:00
Daniel Mendler
b51389ce8f
; exwm-background: Wrap docstrings to avoid compiler warnings 2024-01-12 10:07:01 +01:00
Daniel Mendler
262aa04855
; README and commentary: Mention background and xim features 2024-01-12 10:06:59 +01:00
Adrián Medraño Calvo
798dc60a9b ; Shorten docstrings 2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
4192762223 Merge branch 'minad.github.com/blocking-subrs' into externals/exwm 2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
9b5e4dc1c0 Merge branch 'minad.github.com/remove-cm' into externals/exwm 2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
01ae286e49 Merge branch 'Stebalien.github.com/steb/passthrough-input' into externals/exwm 2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
64d324e6ea Merge branch 'Stebalien.github.com/steb/fix-subordinate-daemon' into externals/exwm
* ch11ng.github.com/pull/939:
  Correctly stop the subordinate Emacs daemon
2024-01-08 00:00:00 +00:00
Adrián Medraño Calvo
92fbafee6c Update copyright year to 2024 2024-01-08 00:00:00 +00:00
Steven Allen
6eaa0301f1 Correctly stop the subordinate Emacs daemon
This patch starts Emacs as a foreground daemon (so it can accurately be
killed) and terminates it by sending a signal (because
'server-force-delete' stops the local server, not the named server).

* exwm.el (exwm--server-timeout): The time to politely wait for the
subordinate server to exit before killing it.
(exwm--server-stop): Send SIGTERM to the subordinate process instead of
using 'server-force-delete'.
(exwm--server-eval-at): Prevent Emacs from forking so we can manage it
as a subprocess.
2023-12-31 08:47:49 -08:00
Steven Allen
8ea607ba85 Passthrough input when explicitly reading events and keys
When any of these functions are called, Emacs expects to receive all
input events until they return. Unfortunately, there doesn't appear to
be a reliable way to detect that these functions are currently running
other than advising them.

* exwm-input.el (exwm-input--init): Advise low-level input reading
functions to bind 'exwm-input-line-mode-passthrough' to t when called.
(exwm-input--exit): Unadvise.
(exwm-input--call-with-passthrough): The advice.
(exwm-input--passthrough-functions): The functions we now advise.
2023-12-29 14:36:11 -08:00
Daniel Mendler
50681727e3 Add message-box and message-or-box to exwm-blocking-subrs (fix #874)
* exwm.el (exwm-blocking-subrs): Add `message-box' and
`message-or-box' to the list of blocking subrs.
2023-12-29 15:39:07 +01:00
Daniel Mendler
0b23607ca3 Remove exwm-cm
The exwm-cm feature has been obsoleted over five years ago in 7823eb98.  Stop
distributing it.

* exwm-cm.el: Remove file.
2023-12-29 14:08:32 +01:00
Adrián Medraño Calvo
56db521a3e Merge branch 'arnebab.github.com/master' into externals/exwm 2023-10-06 00:00:00 +00:00
Adrián Medraño Calvo
86f43494eb Bump version to 0.28 2023-10-06 00:00:00 +00:00
David Wilson
31f0f0a9c7 Catch and report all errors raised when invoking command hooks
* exwm-input.el (exwm-input--fake-last-command): Catch and report
all errors raised when invoking `pre-command-hook' and
`post-command-hook'.

Copyright-paperwork-exempt: yes
2023-09-11 00:00:00 +00:00
Adrián Medraño Calvo
8cab6c03fa Fix workspace height unsharing workarea value
* exwm-workspace.el (exwm-workspace--update-workareas): Clone the
value of the `exwm-geometry' frame parameter before modifying it
for calculating workareas.
(exwm-workspace--update-workareas): Simplify `pcase' patterns.
2023-09-10 00:00:00 +00:00
Adrián Medraño Calvo
381637aa1c Declare external function
* exwm.el:
* exwm-randr.el: Declare `x-get-atom-name' function.
2023-08-18 00:00:00 +00:00
Adrián Medraño Calvo
d3567a8c7f Fix bytecompiler warnings, improve docstrings
* exwm-core.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm-xim.el: Improve docstrings.

* exwm-xim.el (cl-lib): Require `cl-lib' at runtime for
  `cl-position'.
* exwm-core.el (exwm-debug): Specify custom's group.
* exwm-systemtray.el (xcb:systemtray:-ClientMessage): Quote
  `:initform''s argument.
2023-08-18 00:00:00 +00:00