Reversible C-x 1

This commit is contained in:
Tobias Ostner 2026-04-26 11:25:52 +02:00
parent 99a4578a44
commit e6c71ce69c

View file

@ -199,7 +199,16 @@
(use-package emacs (use-package emacs
:ensure nil :ensure nil
:demand t :demand t
:bind (("<C-wheel-up>" . ignore) :preface
(defun to/toggle-delete-other-windows ()
"Delete other windows, or restore the previous window configuration."
(interactive)
(if (and winner-mode
(one-window-p t))
(winner-undo)
(delete-other-windows)))
:bind (("C-x 1" . to/toggle-delete-other-windows)
("<C-wheel-up>" . ignore)
("<C-wheel-down>" . ignore) ("<C-wheel-down>" . ignore)
("<pinch>" . ignore)) ("<pinch>" . ignore))
:config :config