Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created October 26, 2011 21:14
Show Gist options
  • Save mitchellh/1317888 to your computer and use it in GitHub Desktop.
Save mitchellh/1317888 to your computer and use it in GitHub Desktop.
;; Fullscreen is a bit different on OS X
(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)))))
;; Keyboard shortcut to toggle fullscreen
(global-set-key (kbd "M-n") 'ns-toggle-fullscreen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment