Restrict fullscreen feature to X-based systems.
Recent Emacs in OSX already comes with fullscreen support.
This commit is contained in:
parent
f77ad4d854
commit
1abba58332
2 changed files with 10 additions and 9 deletions
|
@ -514,13 +514,17 @@ With numeric prefix arg DEC, decrement the integer by DEC amount."
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
(prelude-increment-integer-at-point (- (or dec 1))))
|
(prelude-increment-integer-at-point (- (or dec 1))))
|
||||||
|
|
||||||
|
;;; Emacs in OSX already has fullscreen support
|
||||||
|
(when (eq window-system 'x)
|
||||||
(defun prelude-fullscreen ()
|
(defun prelude-fullscreen ()
|
||||||
"Makes Emacs window fullscreen.
|
"Makes Emacs window fullscreen.
|
||||||
|
|
||||||
This follows freedesktop standards."
|
This follows freedesktop standards, should work in X servers."
|
||||||
(interactive)
|
(interactive)
|
||||||
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
|
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
|
||||||
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
|
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
|
||||||
|
(global-set-key (kbd "<f11>") 'prelude-fullscreen)
|
||||||
|
)
|
||||||
|
|
||||||
(provide 'prelude-core)
|
(provide 'prelude-core)
|
||||||
;;; prelude-core.el ends here
|
;;; prelude-core.el ends here
|
||||||
|
|
|
@ -96,9 +96,6 @@
|
||||||
;; replace buffer-menu with ibuffer
|
;; replace buffer-menu with ibuffer
|
||||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||||
|
|
||||||
;; make window fullscreen
|
|
||||||
(global-set-key (kbd "<f11>") 'prelude-fullscreen)
|
|
||||||
|
|
||||||
;; toggle menu-bar visibility
|
;; toggle menu-bar visibility
|
||||||
(global-set-key (kbd "<f12>") 'menu-bar-mode)
|
(global-set-key (kbd "<f12>") 'menu-bar-mode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue