Re:PyRoom — distraction free writing
by visitor4rmindia on Sunday February 28, 2010 @12:05PM
(#1157137)
Here you go:
(defun fullscreen ()
(interactive)
(let (f w l r cb b)
(setq cb (current-buffer))
(setq b (switch-to-buffer "*NOSUCHBUFFER*")) ;Temp buffer otherwise
(setq f (make-frame '((fullscreen . fullboth)))) ;settings don't take effect
(select-frame-set-input-focus f)
(setq w (frame-width f))
(setq l (/ (- w 80) 2))
(setq r (- w (+ l 80)))
(seq-default left-margin-width l
right-margin-width r)
(delete-other-frames f) ;Only one main window
(kill-buffer b) ;Kill temp buffer - now original buffer will get new margins
(switch-to-buffer cb)))
(defun fullscreen-off ()
(interactive)
(let (f cb b p)
(setq cb (current-buffer))
(setq b (switch-to-buffer "*NOSUCHBUFFER*")) ;Temp buffer
(setq-default left-margin-width nil
right-margin-width nil)
(kill-buffer b)
(delete-other-frames (make-frame))
(switch-to-buffer cb)))
Re:PyRoom — distraction free writing
by GeoJawDguJin on Sunday February 28, 2010 @01:41PM
(#1157257)
MacVim's full screen mode has the neatest implementation I've seen of this. Play with the 'fuoptions' setting, which gives you control over the margin color and the maximization behavior. If you disable maximization, it will just use the height/width values in 'lines' and 'columns' and the (borderless) window will be in the center of the screen.
Aquamacs: SHIFT-ALT-ENTER full-screens a frame. For side margins you can look at "fringe" settings.
I would forever be your e-servant if you know how to do that. I'm sure I could figure out some hack, but it's just something I'd rather not work on.