Skip to content

Instantly share code, notes, and snippets.

@drankard
Created November 15, 2010 08:09
Show Gist options
  • Save drankard/700153 to your computer and use it in GitHub Desktop.
Save drankard/700153 to your computer and use it in GitHub Desktop.
emacs toggle-fullscreen incl. f11 binding
(defun toggle-fullscreen (&optional f)
(interactive)
(let ((current-value (frame-parameter nil 'fullscreen)))
(set-frame-parameter nil 'fullscreen
(if (equal 'fullboth current-value)
(if (boundp 'old-fullscreen) old-fullscreen nil)
(progn (setq old-fullscreen current-value)
'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment