-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
maxframe.el
31 lines (27 loc) · 1015 Bytes
/
maxframe.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;;; Frame size manipulation.
(defun personal-init-fullscreen ()
;; (setq ns-auto-hide-menu-bar t)
(setq ns-use-native-fullscreen nil)
(global-set-key [(meta return)] 'toggle-frame-fullscreen)
;; (add-hook 'after-init-hook 'toggle-frame-fullscreen t)
)
(defun personal-init-ns-fullscreen ()
;; (setq ns-auto-hide-menu-bar t)
(setq ns-use-native-fullscreen nil)
(global-set-key [(meta return)] 'ns-toggle-fullscreen)
(add-hook 'after-init-hook 'ns-toggle-fullscreen t))
(defun personal-init-maxframe ()
;; Biggest monitor width I currently have. This is necessary when multiple
;; monitors exist; otherwise, the frame will span multiple displays.
(setq mf-max-width 2560)
(global-set-key [(meta return)] 'mf)
(add-hook 'after-init-hook 'maximize-frame t))
(if (window-system)
(cond
((fboundp 'toggle-frame-fullscreen)
(personal-init-fullscreen))
((fboundp 'ns-toggle-fullscreen)
(personal-init-ns-fullscreen))
(t
(personal-init-maxframe))
))