From: Sam Steingold <sds@gnu.org>
To: emacs-devel@gnu.org
Subject: toggle-frame-maximized
Date: Tue, 11 Dec 2012 15:38:10 -0500 [thread overview]
Message-ID: <87boe0qq8d.fsf@gnu.org> (raw)
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.
next reply other threads:[~2012-12-11 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 20:38 Sam Steingold [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87boe0qq8d.fsf@gnu.org \
--to=sds@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).