Re: How to configure sawfish so that run emacs in maximum mode
- From: jadamson partners org (Joel J. Adamson)
- To: netawater <netstandin-003 yahoo com cn>
- Cc: sawfish-list gnome org
- Subject: Re: How to configure sawfish so that run emacs in maximum mode
- Date: Thu, 15 May 2008 10:36:11 -0400
netawater <netstandin-003 yahoo com cn> writes:
> Yes, I hope emacs run in full-screen after it is booted.
>
> Thank you for your reply, but what is work-frame-defaults,
> I can not find this function in my emacs.
Sorry, that's another frame function of mine. Here's the whole file:
;;; my-frames.el --- Joel's Frame customizations and functions
;; Copyright (C) 2008 Joel J. Adamson
;; Author: Joel J. Adamson <jadamson partners org>
;; Keywords: frames
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; I use these functions for customizing my frames
;;; Code:
;; frame parameters
;; fonts and faces
(display-time)
(ansi-color-for-comint-mode-on)
(setq frame-title-format (concat "Emacs: %b" "@" (getenv "HOSTNAME")))
(setq initial-frame-alist '((height . 56)
(width . 100)
(vertical-scroll-bars . t)
(tool-bar-lines . 1)
(menu-bar-lines . 1)))
(setq default-frame-alist initial-frame-alist)
;; menu frame defaults
;; menu frame defaults
(defun menu-frame-defaults ()
"Make frame have a menu-bar, tool-bar and vertical
lefthand scroll-bar. Use \"M-x toggle-frame-parameters\"
to change to work-frame."
(interactive)
(mapc 'make-variable-frame-local
'(height width left top menu-bar-lines
tool-bar-lines vertical-scroll-bars))
(modify-frame-parameters '() '((height . 56)
(width . 100)
(vertical-scroll-bars . t)
(tool-bar-lines . 1)
(menu-bar-lines . 1)))
(put 'current-frame 'frame-mode 'menu-frame))
;; work frame defaults:
(defun work-frame-defaults ()
"Make frame have no GUI elements except window border
and title bar. Use \"M-x toggle-frame-parameters\"
to change to menu-frame."
(interactive)
(mapc 'make-variable-frame-local
'(height width left top
menu-bar-lines tool-bar-lines vertical-scroll-bars))
(modify-frame-parameters '() '((height . 56)
(width . 100)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(vertical-scroll-bars . nil)
(top . 4)
(left . 4)))
(put 'current-frame 'frame-mode 'work-frame))
;; work frame defaults:
(defun fullscreen-defaults ()
"Make frame have no GUI elements except window border
and title bar. Use \"M-x toggle-frame-parameters\"
to change to menu-frame."
(interactive)
(mapc 'make-variable-frame-local
'(height width left top
menu-bar-lines tool-bar-lines vertical-scroll-bars))
(modify-frame-parameters '() '((menu-bar-lines . 0)
(tool-bar-lines . 0)
(vertical-scroll-bars . nil)))
(put 'current-frame 'frame-mode 'fullscreen))
;; toggle frame parameters function
(defun toggle-frame-parameters ()
(interactive)
(let ((current-frame-mode (get 'current-frame 'frame-mode)))
(cond ((equal current-frame-mode 'menu-frame)
(work-frame-defaults)
(setq last-frame-mode 'menu-frame))
((equal current-frame-mode 'work-frame)
(menu-frame-defaults)
(setq last-frame-mode 'work-frame))
(t (work-frame-defaults)))))
;;Full screen toggle
;;courtesy of http://www.emacswiki.org/cgi-bin/wiki/FullScreen
(defun toggle-fullscreen ()
"Toggle between fullscreen and partial screen display on X11;
courtesy of http://www.emacswiki.org/cgi-bin/wiki/FullScreen"
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0))
(work-frame-defaults)
(put 'current-frame 'frame-mode 'fullscreen))
(provide 'my-frames)
;;; my-frames.el ends here
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
Ineffective security measure:
The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]