aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-07-07 22:52:22 +0800
committerGuangxiong Lin <[email protected]>2022-07-07 22:52:22 +0800
commitcfb9fd37f61f421a6027fbc8bd2fcd5cf68b4cfd (patch)
tree50684c4cfe2a3dfa666098c1d06fc52b67037b7e
parentf3640ba63d39d15f220bfc92e28bb3bec1955d7b (diff)
downloaddotfiles-cfb9fd37f61f421a6027fbc8bd2fcd5cf68b4cfd.tar.gz
dotfiles-cfb9fd37f61f421a6027fbc8bd2fcd5cf68b4cfd.tar.bz2
dotfiles-cfb9fd37f61f421a6027fbc8bd2fcd5cf68b4cfd.zip
Update emacs config
-rw-r--r--.emacs.d/lisp/init-appearance.el8
-rw-r--r--.emacs.d/lisp/init-deft.el4
-rw-r--r--.emacs.d/lisp/init-minibuffer.el1
-rw-r--r--.emacs.d/lisp/init-org-agenda.el21
-rw-r--r--.emacs.d/lisp/init-org.el11
5 files changed, 24 insertions, 21 deletions
diff --git a/.emacs.d/lisp/init-appearance.el b/.emacs.d/lisp/init-appearance.el
index ff848f6..8a42f6a 100644
--- a/.emacs.d/lisp/init-appearance.el
+++ b/.emacs.d/lisp/init-appearance.el
@@ -16,9 +16,13 @@
(gx/set-appearance--linux))
(when *is-a-mac*
(gx/set-appearance--mac)))
- (when (gx/maybe-require-package 'doom-themes)
- (load-theme 'doom-one)))
+ (gx/load-theme))
+
+(defun gx/load-theme ()
+ (when (gx/maybe-require-package 'doom-themes)
+ (load-theme 'doom-one t)
+ (doom-themes-org-config)))
(add-to-list 'after-make-frame-functions #'gx/set-appearance-for-frame)
(add-hook 'after-init-hook #'gx/set-appearance 'append)
diff --git a/.emacs.d/lisp/init-deft.el b/.emacs.d/lisp/init-deft.el
index 23d288f..7a5a2a6 100644
--- a/.emacs.d/lisp/init-deft.el
+++ b/.emacs.d/lisp/init-deft.el
@@ -1,4 +1,6 @@
-(gx/maybe-require-package 'deft)
+(when (gx/maybe-require-package 'deft)
+ (define-key global-map (kbd "C-c n d") #'deft))
+
(setq deft-recursive t
deft-use-filter-string-for-filename t
deft-extensions '("org" "txt" "md" "tex")
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 95cb571..cea24c9 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -20,7 +20,6 @@
(lambda () (interactive) (vertico-previous (/ vertico-count 2)))))
(when (gx/maybe-require-package 'consult)
- (require 'consult)
(when (gx/maybe-require-package 'projectile)
(autoload 'projectile-project-root "projectile")
(setq consult-project-function (lambda (_) (projectile-project-root))))
diff --git a/.emacs.d/lisp/init-org-agenda.el b/.emacs.d/lisp/init-org-agenda.el
index 4f047cd..18b2441 100644
--- a/.emacs.d/lisp/init-org-agenda.el
+++ b/.emacs.d/lisp/init-org-agenda.el
@@ -12,19 +12,6 @@
(org-agenda-log-mode-items '(state clock closed))))
"A block showing my schedule and logged tasks for this week.")
-(defvar gx/org-agenda-block--stuck-projects
- '(org-ql-block '(and (or (tags "PROJECT")
- (not (ancestors (todo))))
- (todo)
- (not (done))
- (not (todo "SOMEDAY"))
- (not (todo "NEXT"))
- (not (scheduled))
- (not (descendants (todo "NEXT")))
- (not (descendants (scheduled))))
- ((org-ql-block-header "Stuck Projects")))
- "A block showing stuck projects.")
-
(defvar gx/org-agenda-block--unwilling-to-do
'(tags-todo "UNWILLING"
((org-agenda-overriding-header "Unwilling to do")))
@@ -58,6 +45,12 @@
((org-ql-block-header "Next unscheduled tasks")))
"A block showing next unscheduled tasks.")
+(defvar gx/org-agenda-block--inbox
+ '(tags "INBOX"
+ ((org-agenda-overriding-header "INBOX:")
+ (org-tags-match-list-sublevels nil)))
+ "A block showing my tasks in INBOX.")
+
(defvar gx/org-agenda-block--display-settings
'((org-agenda-todo-ignore-deadlines 'near)
(org-agenda-todo-ignore-scheduled t))
@@ -144,11 +137,11 @@
(setq org-agenda-custom-commands
`((" " "Daily agenda and all important TODOs"
(,gx/org-agenda-block--today-schedule
+ ,gx/org-agenda-block--inbox
,gx/org-agenda-block--attention
,gx/org-agenda-block--unwilling-to-do
;; (tags-todo "computer|@office|phone")
;; (tags "PROJECT+CATEGORY=\"elephants\"")
- ,gx/org-agenda-block--stuck-projects
,gx/org-agenda-block--next-not-scheduled
,gx/org-agenda-block--waiting-not-scheduled)
,gx/org-agenda-block--display-settings)
diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el
index 68ab560..12ca4f2 100644
--- a/.emacs.d/lisp/init-org.el
+++ b/.emacs.d/lisp/init-org.el
@@ -69,6 +69,8 @@
(setq org-tags-column (- fill-column))
(setq org-agenda-tags-column org-tags-column)
(setq org-startup-folded 'showall)
+(setq org-stuck-projects
+ '("/+TODO={TODO|WAITING}" ("NEXT") nil "SCHEDULED:"))
(with-eval-after-load 'org-indent
(gx/diminish 'org-indent-mode))
@@ -104,9 +106,9 @@
;; capture
(setq org-capture-templates
'(("t" "TODO" entry (file+headline org-default-notes-file "Tasks")
- "* TODO %?\nCaptured on %U\n %i\n %a")
- ("j" "Journal" entry (file+datetree org-default-notes-file)
- "* %?\nCaptured on %U\n %i\n %a")))
+ "* TODO %?\nCaptured on %U")
+ ("j" "Journal" entry (file+datetree org-default-notes-file)
+ "* %?\nCaptured on %U")))
;; clock
(setq org-clock-persist 'history)
@@ -131,6 +133,9 @@
(autoload #'org-roam-node-find "org-roam-node" nil t)
(autoload #'org-roam-dailies-goto-today "org-roam-dailies" nil t)
(add-hook 'org-mode-hook #'org-roam-db-autosync-mode))
+
+(with-eval-after-load 'org
+ (define-key org-mode-map (kbd "C-c n i") #'org-roam-node-insert))
(with-eval-after-load 'evil
(evil-define-key 'normal 'global
(kbd "<leader>fn") 'org-roam-node-find