doomemacs/core/autoload/ui.el

28 lines
714 B
EmacsLisp
Raw Normal View History

2017-02-01 13:31:58 +08:00
;;; ui.el
;;;###autoload
(defun doom/toggle-fullscreen ()
"Toggle fullscreen Emacs."
(interactive)
(set-frame-parameter
nil 'fullscreen
(unless (frame-parameter nil 'fullscreen)
'fullboth)))
;;;###autoload
2017-05-14 04:39:50 +08:00
(defun doom/toggle-line-numbers (&optional arg)
"Toggle `linum-mode'."
(interactive "P")
(linum-mode (or arg (if linum-mode -1 +1))))
2017-02-01 13:31:58 +08:00
;;;###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)
(if (and (one-window-p)
(assoc ?_ register-alist))
(jump-to-register ?_)
(window-configuration-to-register ?_)
(delete-other-windows)))