From 3ef8a47834ddd21c83721393f6202e8c456f02db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Mon, 26 Jan 2015 00:17:19 -0500 Subject: [PATCH] remove menu bar and switch to fullscreen as well this remembers the previous menu bar setting, but not the full screen setting. we therefore assume full screen mode is always off before turning on darkroom, which may be inaccurate. we do our best with fullscreen, yet it doesn't always seem to be enough, see: http://www.emacswiki.org/emacs/FullScreen ... for more information. it may also be useful to consider more frame parameters, see: https://www.gnu.org/software/emacs/manual/html_node/elisp/Management-Parameters.html#Management-Parameters for more ideas. "sticky" strikes me as a possibly good idea. --- darkroom.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/darkroom.el b/darkroom.el index 6542469..42cdabf 100644 --- a/darkroom.el +++ b/darkroom.el @@ -270,6 +270,7 @@ window's geometry." (defconst darkroom--saved-variables '(mode-line-format header-line-format + menu-bar-mode fringes-outside-margins) "Variables saved in `darkroom--saved-state'") @@ -291,6 +292,8 @@ With optional JUST-MARGINS, just set the margins." (setq mode-line-format nil header-line-format nil fringes-outside-margins darkroom-fringes-outside-margins) + (menu-bar-mode -1) + (set-frame-parameter nil 'fullscreen 'fullboth) (text-scale-increase darkroom-text-scale-increase)) (mapc #'(lambda (w) (with-selected-window w @@ -302,6 +305,8 @@ With optional JUST-MARGINS, just set the margins." (mapc #'(lambda (pair) (set (make-local-variable (car pair)) (cdr pair))) darkroom--saved-state) + (menu-bar-mode menu-bar-mode) + (set-frame-parameter nil 'fullscreen nil) (setq darkroom--saved-state nil) (text-scale-decrease darkroom-text-scale-increase) (mapc #'(lambda (w)