Skip to content

Commit c1d181e

Browse files
committed
feat: add init-local mechainics
1 parent f958767 commit c1d181e

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ el-get/
8080
/workspace/
8181
/projects
8282
/data/autosave
83-
/librime/
83+
/librime/
84+
/lisp/init-local*

init.el

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646

4747
;;; Common
48+
(use-package init-local-early)
4849
(use-package init-common)
4950
(use-package init-my
5051
:bind
@@ -311,6 +312,7 @@
311312
(use-package init-optional)
312313
(use-package init-mu4e :commands mu4e)
313314
(use-package init-writing)
315+
(use-package init-local)
314316

315317
(message "*** Emacs loaded in %s with %d garbage collections."
316318
(format "%.2f seconds"

lisp/init-common.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
(when window-system
107107
(set-frame-position (selected-frame) 0 0)
108-
(set-frame-size (selected-frame) 210 60))
108+
(set-frame-size (selected-frame) lo-frame-width lo-frame-height))
109109

110110
(provide 'init-common)
111111
;;; init-common.el ends here

lisp/init-local-early.el

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
;;; init-local-early --- A place to write local configurations.
2+
;;;
3+
;;; Commentary:
4+
;;;
5+
;;; Which means this file is ignored by .gitignore, any changes won't
6+
;;; commit to the repository.
7+
;;; Code:
8+
9+
(defgroup lo nil
10+
"Configurations of local."
11+
:group 'convenience)
12+
13+
(defcustom lo-frame-width
14+
204
15+
"Local frame width."
16+
:type '(integer))
17+
18+
(defcustom lo-frame-height
19+
58
20+
"Local frame height."
21+
:type '(integer))
22+
23+
(provide 'init-local-early)
24+
;;; init-local-early.el ends here.

lisp/init-local.el

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
;;; init-local --- A place to write local configurations.
2+
;;;
3+
;;; Commentary:
4+
;;;
5+
;;; Which means this file is ignored by .gitignore, any changes won't
6+
;;; commit to the repository.
7+
;;; Code:
8+
9+
10+
(provide 'init-local)
11+
;;; init-local.el ends here.

0 commit comments

Comments
 (0)