summaryrefslogtreecommitdiff
path: root/nemacs-util.el
blob: e8478914d5f9083575299b1bfda536ccfd1e2f8b (plain)
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
(setq create-lockfiles disable-lockfiles)
(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

(setq image-types (cons 'svg image-types))

(menu-bar-mode -1)
(scroll-bar-mode -1)
(toggle-scroll-bar -1)
(tool-bar-mode -1)
(set-fringe-mode 0)
(display-battery-mode +1)
(global-prettify-symbols-mode t)
(blink-cursor-mode +1)
(global-hl-line-mode -1)
(global-visual-line-mode +1)
(blink-cursor-mode +1)
(global-hl-line-mode -1)
(global-visual-line-mode +1)

(setq-default indicate-empty-lines +1
	      indicate-buffer-boundaries +1)

(setq electric-pair-pairs '(
			    (?\{ . ?\})
			    (?\( . ?\))
			    (?\[ . ?\])
			    (?\" . ?\")
			    ))
(electric-pair-mode t)

(defun nemacs/my-frame-config (&optional frame)
  (with-selected-frame (or frame (selected-frame))
    (set-frame-parameter (selected-frame) 'alpha '(95 . 90))
    (cond
     ((find-font (font-spec :name "Andale Mono"))
      (set-frame-font "Andale Mono-14")))
    (set-face-attribute 'default nil :height 140)))

(defun nemacs/my-silly-frame-config (&optional frame)
  (with-selected-frame (or frame (selected-frame))
    (set-frame-parameter (selected-frame) 'alpha '(95 . 90))
    (cond
     ((find-font (font-spec :name "Liga Comic Mono"))
      (set-frame-font "Liga Comic Mono-14")))
    (set-face-attribute 'default nil :height 140)))

(add-to-list 'default-frame-alist '(fullscreen . maximized))
(add-hook 'after-make-frame-functions 'nemacs/my-frame-config)
(add-hook 'after-init-hook 'nemacs/my-frame-config)

(provide 'nemacs-util)