-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.el
More file actions
279 lines (219 loc) · 10.3 KB
/
Copy pathconfig.el
File metadata and controls
279 lines (219 loc) · 10.3 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; This is a file generated from a literate programing source file located at
;; https://gitlab.com/zzamboni/dot-doom/-/blob/master/doom.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
;; (setq org-directory "~/org/")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
;; (setq display-line-numbers-type t)
(remove-hook! (text-mode prog-mode conf-mode) #'display-line-numbers-mode)
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;;; Global Unset Keys
(map! "<f2>" nil
"<f10>" nil
"M-\\" nil ; delete-horizontal-space
"M-a" nil ; forward-sentence - use evil motion instead
"M-c" nil ; capitalize-word
"M-e" nil) ; backward-sentence - use evil motion instead
;;; Load 'Per-Machine' - User Configs
;; Most of my per-environment config done via =customize= and is in .custom.el.
;; However, some config is more involved, such as packages I just want in one
;; environment and not the others. To that end, let's load a file that can contain
;; those customizations.
(let ((per-machine-filename (concat doom-user-dir "per-machine.el")))
(when (file-exists-p per-machine-filename)
(load-file per-machine-filename)))
;;; GENERAL SETTINGS
;;; Pi daemon bootstrap
(when (and (daemonp)
(string= server-name "pi")
(not (featurep 'agent-server)))
(setq agent-server-enable-socket nil)
(let ((agent-server-file (expand-file-name "bin/agent-server.el" doom-user-dir)))
(when (file-exists-p agent-server-file)
(load agent-server-file nil t)
(message "[pi] agent-server API loaded into daemon '%s'" server-name))))
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
;; (setq display-line-numbers-type 'relative)
;; /doom/high-school-macos-emacs-dev-env/doom/init.el
(setq-default x-stretch-cursor t) ; make the cursor wide over tabs, etc.
(setq undo-limit 80000000) ; Raise undo-limit to 80Mb
;; When I bring up Doom's scratch buffer with SPC x, it's often to play with
;; elisp or note something down (that isn't worth an entry in my notes). I can
;; do both in `lisp-interaction-mode'.
(setq doom-scratch-initial-major-mode 'emacs-lisp-mode)
;; Set initial buffer to org
(setq initial-major-mode #'text-mode)
;;; Leader key
;; Over-ride or add to Doom Emacs default key bindings
;; https://discourse.doomemacs.org/t/what-are-leader-and-localleader-keys/153
;; 'M-m', '\,' 'SPC m' for localleader
(setq doom-localleader-key ","
doom-localleader-alt-key "C-,")
(defun my/call-localleader ()
(interactive)
(setq unread-command-events (listify-key-sequence ",")))
(map! :leader (:desc "+major-mode" "m" #'my/call-localleader))
(after! evil
;; (global-set-key (kbd "M-m") #'my/call-localleader)
(evil-define-key '(normal visual) prog-mode-map (kbd "C-,") 'my/call-localleader))
;;; better default → lisp/defaults-config.el
;;; pass + auth (gptel 등에서 API 키 접근을 위해 즉시 로드)
;;
;; GPG 에이전트 캐시 설정 (암호 입력 빈도 줄이기):
;; ~/.gnupg/gpg-agent.conf 파일에 다음 추가 후 `gpgconf --kill gpg-agent` 실행
;; default-cache-ttl 31536000 ; 1년 (사실상 영구)
;; max-cache-ttl 31536000
;; allow-preset-passphrase ; 외부 도구가 암호 프리셋 가능
;; pinentry-program /usr/bin/pinentry-gnome3
;;
;; auth-sources 선택:
;; - password-store: `pass` CLI 기반, 디렉터리 구조 (~/.password-store/)
;; - authinfo.gpg: 전통적 Emacs 방식, 단일 파일 (~/.authinfo.gpg)
;; - 둘 다 사용 시: (setq auth-sources '(password-store "~/.authinfo.gpg"))
;;
;; gptel API 키 접근 방식:
;; - password-store-get 함수로 직접 가져옴 (auth-source 우회)
;; - 예: (password-store-get "api/anthropic/personal")
(require 'password-store)
(setq pass-username-field "login"
password-store-password-length 24)
(use-package! password-store-menu
:after password-store
:custom (password-store-menu-key "C-c C-p")
:config
(password-store-menu-enable))
;; (setq auth-sources '(password-store "~/.authinfo.gpg"))
;; (setq auth-sources '("~/.authinfo.gpg")
;; auth-source-cache-expiry nil) ; default is 7200 (2h)
;;; Load libraries via require (prevents duplicate loading)
(add-load-path! "lisp/")
(load! "+user-info") ; no provide, keep load!
(require 'defaults-config) ; better defaults (auto-revert, xref, lockfiles 등)
(require 'ui-config)
(require 'evil-config)
(require 'korean-input-config)
(require 'time-config)
(require 'completion-config)
(require 'module-emacs-config)
(require 'org-config)
(require 'denote-config)
(require 'denote-silo-config)
(require 'denote-export-config)
(require 'org-functions)
(require 'denote-functions)
(require 'unicode-config)
(require 'editing-config)
(require 'ai-gptel)
(require 'ai-agent-shell) ; acp 설정
(require 'ai-pi-agent) ; Pi coding agent 설정
(require 'ai-bot-config) ; Telegram 봇 통합
(require 'ai-stt-whisper)
(require 'ai-tts-edge)
(require 'modeline-config)
(require 'tab-bar-config)
(require 'prog-mode-config)
;; (require 'sks-hub-nav) ; SKS Hub Zig 상태머신 네비게이션
;; (require 'android-config) ; Android/Kotlin 개발 환경
(require 'utils-config)
(require 'project-config)
;; (load! "lisp/ai-gptel-local-proxy" nil t) ; 로컬 전용 프록시 (없으면 무시)
(require 'elfeed-config) ; elfeed + gptel 인라인 요약/번역 + remember
(require 'zotero-config) ; zotero translation server (조건부 로딩)
;; (require 'ai-orchestration) ; efrit/beads (조건부 로딩)
(require 'tmux-config) ; tmux + claude code orchestration
;; (require 'zellij-config) ; zellij terminal multiplexer
(require 'search-config) ; recent-rgrep 등 검색 도구
(require 'andenken-config) ; andenken 시멘틱 메모리 클라이언트
;; Emacs 내부 터미널 에뮬레이터(vterm/ghostel 등)는 user/pi 인스턴스에서.
;; agent-server/server 같은 보조 데몬에서는 터미널 모듈 로딩을 피한다.
(when (member server-name '("user" "pi"))
(require 'term-config))
(require 'keybindings-config)
(require 'keybindings-denote-config)
;; (require 'casual-config) ; casual transient UI (<f12>)
(require 'termux-config)
(require 'tty-config) ; 터미널(TTY) 통합: term-keys, kitty-graphics, clipboard
;; (require 'eaf-config) ; EAF (조건부 로딩)
(require 'present-config)
(require 'functions)
;;; overide doomemacs
;;;; fortune
;; not work on termux
;; (unless my/termux-p
;; (require 'fortune)
;; (setq fortune-always-compile nil)
;; (setq fortune-dir (concat root-path "usr/share/games/fortunes/advice"))
;; (setq fortune-file (concat root-path "usr/share/games/fortunes/advice")))
;; term-keys, clipboard, kitty-graphics → lisp/tty-config.el 로 이동
;;; TODO Custom Integration
;;;; Notification System (dunst via notify-send)
(defun my/notify (title message &optional urgency duration)
"Send system notification via notify-send (dunst).
TITLE: notification title
MESSAGE: notification body
URGENCY: low, normal, critical (default: normal)
DURATION: milliseconds (default: 4000)
Works in both GUI and terminal (emacs -nw) environments.
Requires notify-send (libnotify) and dunst daemon.
Returns t on success, nil if notify-send is not available."
(when (executable-find "notify-send")
(let ((urgency (or urgency "normal"))
(duration (or duration 4000)))
(ignore-errors
(call-process "notify-send" nil 0 nil
"-u" urgency
"-t" (format "%d" duration)
title
message))
t)))
;; )
;;; DONT py3status integration (ElleNajit)
;; (with-eval-after-load 'org-clock
;; (add-hook 'org-clock-in-hook #'junghan/update-org-clocked-in-task-file)
;; (add-hook 'org-clock-out-hook #'junghan/update-org-clocked-in-task-file)
;; (add-hook 'org-after-todo-state-change-hook #'junghan/update-org-clocked-in-task-file)
;; ;; Update every minute
;; (run-at-time "1 min" 60 #'junghan/update-org-clocked-in-task-file))
;;; Workflow Shared (인간/에이전트 공유 — denote 이후 로드)
(after! denote (require 'workflow-shared))
;;; END