Add function to toggle hide titlebar when frame is maximized.

This commit is contained in:
KJ 2024-04-26 18:54:54 -04:00
parent a3ea9985e0
commit 02577be8c7

View File

@ -81,5 +81,18 @@ If PROJECT is not specified, assume current project root."
(when-let (project (project-current))
(project-root project)))
;; Cambia entre ocultar o no la barra de título cuando está maximizado
(defun toggle-hide-title-bar()
"Toggle hide title bar when the frame is maximed."
(interactive)
(if (and (boundp 'title-bar-maximixed) title-bar-maximixed)
(progn
(remove-hook 'window-size-change-functions 'frame-hide-title-bar-when-maximized)
(setq title-bar-maximixed nil))
(progn
(add-hook 'window-size-change-functions 'frame-hide-title-bar-when-maximized)
(setq title-bar-maximixed t)))
)
(provide 'init-functions)
;;; init-functions.el ends here.