Add doom/window-zoom to core/autoload/ui
This commit is contained in:
parent
11a5e15e4e
commit
a46829a06c
1 changed files with 14 additions and 0 deletions
|
@ -25,3 +25,17 @@
|
||||||
(mapc 'disable-theme custom-enabled-themes))
|
(mapc 'disable-theme custom-enabled-themes))
|
||||||
(load-theme theme t)))
|
(load-theme theme t)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/window-zoom ()
|
||||||
|
"Maximize and isolate the current buffer. Activate again to undo this. If the
|
||||||
|
window changes before then, the undo expires."
|
||||||
|
(interactive)
|
||||||
|
(unless (one-window-p)
|
||||||
|
(setq doom-window-zoomed nil))
|
||||||
|
(if doom-window-zoomed
|
||||||
|
(progn
|
||||||
|
(set-window-configuration doom-window-zoomed)
|
||||||
|
(setq doom-window-zoomed nil))
|
||||||
|
(unless (one-window-p t)
|
||||||
|
(setq doom-window-zoomed (current-window-configuration))
|
||||||
|
(delete-other-windows))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue