Browse Source

Merge pull request #359 from haplo/fullscreen

Add command to make Emacs window fullscreen
custom
Bozhidar Batsov 13 years ago
parent
commit
752fc53b9c
  1. 1
      README.md
  2. 12
      core/prelude-core.el

1
README.md

@ -205,6 +205,7 @@ Keybinding | Description
<kbd>C-h A</kbd> | Run `apropos` (search in all Emacs symbols).
<kbd>M-/</kbd> | Run `hippie-expand` (a replacement for the default `dabbrev-expand`).
<kbd>C-x C-b</kbd> | Open `ibuffer` (a replacement for the default `buffer-list`).
<kbd>F11</kbd> | Make the window full screen.
<kbd>F12</kbd> | Toggle the Emacs menu bar.
<kbd>C-x g</kbd> | Open Magit's status buffer.
<kbd>C-=</kbd> | Run `expand-region` (incremental text selection).

12
core/prelude-core.el

@ -514,5 +514,17 @@ With numeric prefix arg DEC, decrement the integer by DEC amount."
(interactive "p")
(prelude-increment-integer-at-point (- (or dec 1))))
;;; Emacs in OSX already has fullscreen support
(when (eq window-system 'x)
(defun prelude-fullscreen ()
"Makes Emacs window fullscreen.
This follows freedesktop standards, should work in X servers."
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
(global-set-key (kbd "<f11>") 'prelude-fullscreen)
)
(provide 'prelude-core)
;;; prelude-core.el ends here
Loading…
Cancel
Save