Refine fullscreen support
This commit is contained in:
parent
752fc53b9c
commit
69e5ab693c
2 changed files with 11 additions and 8 deletions
|
@ -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)
|
||||
(defun prelude-fullscreen ()
|
||||
"Makes Emacs window fullscreen.
|
||||
;;; Emacs has a similar built-in command in 24.4
|
||||
(defun prelude-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
|
||||
|
|
|
@ -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…
Reference in a new issue