-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-gui-frames.el
76 lines (62 loc) · 2.56 KB
/
init-gui-frames.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
;;----------------------------------------------------------------------------
;; Stop C-z from minimizing windows under OS X
;;----------------------------------------------------------------------------
(defun jester/maybe-suspend-frame ()
(interactive)
(unless (and *is-a-mac* window-system)
(suspend-frame)))
(global-set-key (kbd "C-z") 'jester/maybe-suspend-frame)
;;----------------------------------------------------------------------------
;; Suppress GUI features
;;----------------------------------------------------------------------------
(setq use-file-dialog nil)
(setq use-dialog-box nil)
(setq inhibit-startup-screen t)
;;----------------------------------------------------------------------------
;; Window size and features
;;----------------------------------------------------------------------------
(when (fboundp 'tool-bar-mode)
(tool-bar-mode -1))
(when (fboundp 'menu-bar-mode)
(menu-bar-mode -1))
(when (fboundp 'set-scroll-bar-mode)
(set-scroll-bar-mode nil))
(when (fboundp 'horizontal-scroll-bar-mode)
(horizontal-scroll-bar-mode -1))
(when (fboundp 'pixel-scroll-mode)
(pixel-scroll-mode 1))
(let ((no-border '(internal-border-width . 0)))
(add-to-list 'default-frame-alist no-border)
(add-to-list 'initial-frame-alist no-border))
(setq frame-title-format "看,灰机! ✈✈✈✈✈✈✈✈✈"
frame-resize-pixelwise t)
(when (and (boundp 'server-name) (string= server-name "maid"))
(setq frame-title-format "maid"))
;; Non-zero values for `line-spacing' can mess up ansi-term and co,
;; so we zero it explicitly in those cases.
(add-hook 'term-mode-hook
(lambda ()
(setq line-spacing 0)))
(setq default-frame-alist
`((fullscreen . ,(cond
;; ((eq window-system 'x) 'fullboth)
((eq window-system 'x) 'maximized) ;; wsl favours maximized
;; ((eq window-system 'mac) 'fullboth)
((eq window-system 'ns) 'maximized)
((eq window-system 'mac) 'maximized)
(t 'maximized)))
;; left & top are required on wsl to correctly position
(left . (+ 0))
(top . (+ 0))
(undecorated . t)))
;; (use-package holo-layer
;; :ensure nil
;; :straight (holo-layer :type git :host github :repo "manateelazycat/holo-layer"
;; :files ("*" (:exclude ".git" "test")))
;; :init
;; (setq holo-layer-enable-cursor-animation t)
;; :demand t
;; :if window-system
;; :config
;; (holo-layer-enable))
(provide 'init-gui-frames)