emacs-exwm / exwm

Emacs X Window Manager
https://elpa.gnu.org/packages/exwm.html
GNU General Public License v3.0
278 stars 14 forks source link

Add global minor modes for EXWM's features #43

Closed progfolio closed 5 months ago

progfolio commented 5 months ago
minad commented 5 months ago

I agree with this change, but let's please do this at once for all the sub-modes, and deprecate the *-enable functions at the same time.

Overall there are the following functions which should be deprecated and replaced by a mode:

Now is the right time to do this, just after the last release.

progfolio commented 5 months ago

I agree with this change, but let's please do this at once for all the sub-modes, and deprecate the *-enable functions at the same time.

Overall there are the following functions which should be deprecated and replaced by a mode:

* [ ]  exwm-randr-enable

* [ ]  exwm-systemtray-enable

* [ ]  exwm-background-enable

* [ ]  exwm-xim-enable

* [ ]  exwm-xsettings-enable

Now is the right time to do this, just after the last release.

Before moving onto the rest of those, let's get on the same page about how we want to deprecate this one. I've pushed changes which use make-obsolete since the behavior of exwm-systemtray-enable isn't exactly an alias for the new mode. Do you prefer that or a different approach?

Do we want exwm--log run every time the mode is enabled/disabled?

Stebalien commented 5 months ago

make-obsolete seems reasonable.

progfolio commented 5 months ago

make-obsolete seems reasonable.

Addressed above review. The remaining question is:

Do we want exwm--log run every time the mode is enabled/disabled?

Stebalien commented 5 months ago

Do we want exwm--log run every time the mode is enabled/disabled?

Yes. It costs nothing unless debugging is enabled and makes it easy to see what's enabled when we get bug reports.

Stebalien commented 5 months ago

Alternatively, we could add some kind of "bug report" command, but that's a later problem.

progfolio commented 5 months ago

Do we want exwm--log run every time the mode is enabled/disabled?

Yes. It costs nothing unless debugging is enabled and makes it easy to see what's enabled when we get bug reports.

Okay. Added it to the mode definition.

Alternatively, we could add some kind of "bug report" command, but that's a later problem.

Agreed.

minad commented 5 months ago

Steven Allen @.***> writes:

@Stebalien commented on this pull request.

@@ -188,11 +188,16 @@ may kill this connection when they replace it.") exwm-background--connection nil exwm-background--atoms nil))

+;;;###autoload(autoload 'exwm-background-mode "exwm-background" nil t) +(exwm--define-global-minor-mode background

  • "Global minor mode for toggling EXWM background support.")
  • (defun exwm-background-enable ()

Honestly, I think this is basically "done". I'm happy to take it over the finish line tonight unless @minad gets to it first.

Yes, I agree. Please go ahead!