Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Maximized undecorated (title-less) Emacs frame with no gaps around
(defun toggle-frame-maximized-undecorated ()
(let* ((frame (selected-frame))
(on? (and (frame-parameter frame 'undecorated)
(eq (frame-parameter frame 'fullscreen) 'maximized)))
(geom (frame-monitor-attribute 'geometry))
(x (first geom))
(y (second geom))
(display-height (first (last geom))))
(if on?
(set-frame-parameter frame 'undecorated nil)
(set-frame-position frame x y)
(set-frame-parameter frame 'fullscreen 'maximized)
(set-frame-parameter frame 'undecorated t)
(set-frame-height frame (- display-height 26) nil t)
(set-frame-position frame x y)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment