Re:Let's just use Emacs
by brewski on Friday May 27, 2011 @10:36AM
(#2591582)
For linux environments, instead of darkroom-mode you can put this in your .emacs file to toggle fullscreen:
[ Parent
| on HN ]
Alternative if you don't have wmctrl installed (not default in Ubuntu for example):
;; Fullscreen
(defun switch-full-screen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))You can also start using xmonad.
Another alternative that, AFAICS, doesn't use anything external to emacs
;;; Full-screen mode
(defun toggle-max-window ()
(interactive)
(set-frame-parameter nil 'fullscreen
(if (frame-parameter nil 'fullscreen)
nil
'fullboth)))
(global-set-key (kbd "<C-M-return>") 'toggle-max-window)