Skip to content

Instantly share code, notes, and snippets.

@nriley
Created October 13, 2011 00:49
Show Gist options
  • Save nriley/1283061 to your computer and use it in GitHub Desktop.
Save nriley/1283061 to your computer and use it in GitHub Desktop.
(defun toggle-frame-fullscreen (&optional frame)
(interactive)
(set-frame-parameter frame 'fullscreen
(if (null (frame-parameter frame 'fullscreen))
'fullboth nil)))
(global-set-key "\C-x59" 'toggle-frame-fullscreen)
; ediff-toggle-wide-display tries to use the entire display width,
; which breaks with multiple monitors
(defun ediff-fullscreen-as-wide-display ()
(if (eq window-system 'mac)
(defadvice ediff-toggle-wide-display
(around ediff-toggle-frame-fullscreen activate)
(toggle-frame-fullscreen (window-frame ediff-window-A))
(raise-frame ediff-control-frame))))
(add-hook 'ediff-mode-hook 'ediff-fullscreen-as-wide-display)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment