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))))
|
(prelude-increment-integer-at-point (- (or dec 1))))
|
||||||
|
|
||||||
;;; Emacs in OSX already has fullscreen support
|
;;; 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 ()
|
(defun prelude-fullscreen ()
|
||||||
"Makes Emacs window fullscreen.
|
"Make Emacs window fullscreen.
|
||||||
|
|
||||||
This follows freedesktop standards, should work in X servers."
|
This follows freedesktop standards, should work in X servers."
|
||||||
(interactive)
|
(interactive)
|
||||||
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
|
(if (eq window-system 'x)
|
||||||
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
|
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
|
||||||
(global-set-key (kbd "<f11>") 'prelude-fullscreen)
|
'(2 "_NET_WM_STATE_FULLSCREEN" 0))
|
||||||
)
|
(error "Only X server is supported")))
|
||||||
|
|
||||||
(provide 'prelude-core)
|
(provide 'prelude-core)
|
||||||
;;; prelude-core.el ends here
|
;;; prelude-core.el ends here
|
||||||
|
|
|
@ -96,6 +96,9 @@
|
||||||
;; 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)
|
||||||
|
|
||||||
|
(unless (fboundp 'toggle-frame-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