Browse Source

Refine fullscreen support

custom
Bozhidar Batsov 13 years ago
parent
commit
69e5ab693c
  1. 10
      core/prelude-core.el
  2. 3
      core/prelude-global-keybindings.el

10
core/prelude-core.el

@ -515,16 +515,16 @@ With numeric prefix arg DEC, decrement the integer by DEC amount."
(prelude-increment-integer-at-point (- (or dec 1))))
;;; Emacs in OSX already has fullscreen support
(when (eq window-system 'x)
;;; Emacs has a similar built-in command in 24.4
(defun prelude-fullscreen ()
"Makes Emacs window fullscreen.
"Make Emacs window fullscreen.
This follows freedesktop standards, should work in X servers."
(interactive)
(if (eq window-system 'x)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
(global-set-key (kbd "<f11>") 'prelude-fullscreen)
)
'(2 "_NET_WM_STATE_FULLSCREEN" 0))
(error "Only X server is supported")))
(provide 'prelude-core)
;;; prelude-core.el ends here

3
core/prelude-global-keybindings.el

@ -96,6 +96,9 @@
;; replace buffer-menu with ibuffer
(global-set-key (kbd "C-x C-b") 'ibuffer)
(unless (fboundp 'toggle-frame-fullscreen)
(global-set-key (kbd "<f11>") 'prelude-fullscreen))
;; toggle menu-bar visibility
(global-set-key (kbd "<f12>") 'menu-bar-mode)

Loading…
Cancel
Save