unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* toggle-frame-maximized
@ 2012-12-11 20:38 Sam Steingold
  2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
  2012-12-12  6:49 ` toggle-frame-maximized Jan Djärv
  0 siblings, 2 replies; 5+ messages in thread
From: Sam Steingold @ 2012-12-11 20:38 UTC (permalink / raw)
  To: emacs-devel

A de-facto standard keybinding is f11: maximize/full screen the window.
(chrome, gnome-terminal, freeciv - all comply).

Here is an implementation for emacs:

--8<---------------cut here---------------start------------->8---
(defcustom frame-maximization-mode 'maximized
  "The maximization style of \\[toggle-frame-maximized]."
  :version "24.4"
  :type '(choice
          (const :tab "Respect window manager screen decorations." maximized)
          (const :tab "Ignore window manager screen decorations." fullscreen))
  :group 'frames)

(defun toggle-frame-maximized ()
  "Maximize/un-maximize Emacs frame according to `frame-maximization-mode'."
  (interactive)
  (modify-frame-parameters
   nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
                            nil frame-maximization-mode)))))

(define-key global-map [f11] 'toggle-frame-maximized)
--8<---------------cut here---------------end--------------->8---

I think this should go into frame.el.
Objections?

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://honestreporting.com http://jihadwatch.org
http://americancensorship.org http://dhimmi.com http://iris.org.il
A professor is someone who talks in someone else's sleep.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-12  6:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 20:38 toggle-frame-maximized Sam Steingold
2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
2012-12-11 22:38   ` toggle-frame-maximized Sam Steingold
2012-12-11 23:01     ` toggle-frame-maximized Drew Adams
2012-12-12  6:49 ` toggle-frame-maximized Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).