20241214
This commit is contained in:
parent
e4a5818b39
commit
8cff3739ad
3 changed files with 113 additions and 79 deletions
|
@ -46,8 +46,8 @@ This function should only modify configuration layer settings."
|
|||
;; git
|
||||
helm
|
||||
;; lsp
|
||||
markdown
|
||||
multiple-cursors
|
||||
;;markdown
|
||||
;;multiple-cursors
|
||||
;; org
|
||||
;; (shell :variables
|
||||
;; shell-default-height 30
|
||||
|
@ -68,7 +68,7 @@ This function should only modify configuration layer settings."
|
|||
;; `dotspacemacs/user-config'. To use a local version of a package, use the
|
||||
;; `:location' property: '(your-package :location "~/path/to/your-package/")
|
||||
;; Also include the dependencies as they will not be resolved automatically.
|
||||
dotspacemacs-additional-packages '(org-roam org-roam-bibtex org-ref)
|
||||
dotspacemacs-additional-packages '(org-roam helm-org)
|
||||
|
||||
;; A list of packages that cannot be updated.
|
||||
dotspacemacs-frozen-packages '()
|
||||
|
@ -668,6 +668,28 @@ before packages are loaded."
|
|||
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(defun my-org-roam-refile ()
|
||||
"Переместить текущую заметку под заголовок 'Links' в выбранный файл."
|
||||
(interactive)
|
||||
(let* ((node (org-roam-node-read nil nil nil 'require-match))
|
||||
(file (org-roam-node-file node))
|
||||
(heading "Links")
|
||||
target-point)
|
||||
;; Открываем целевой файл и ищем/создаём заголовок "Links"
|
||||
(save-excursion
|
||||
(find-file file)
|
||||
(goto-char (point-min))
|
||||
;; Ищем заголовок "Links"
|
||||
(if (re-search-forward (format org-complex-heading-regexp-format heading) nil t)
|
||||
(setq target-point (point))
|
||||
;; Если заголовок не найден, создаём его
|
||||
(goto-char (point-max))
|
||||
(insert (concat "\n* " heading "\n"))
|
||||
(setq target-point (point))))
|
||||
;; Теперь выполняем перемещение
|
||||
(let ((org-reverse-note-order t)) ;; Перемещать в конец целевого заголовка
|
||||
(org-refile nil nil (list heading file nil target-point)))))
|
||||
|
||||
(setq org-attach-method 'cp) ;; copy file to an attachments dir.
|
||||
(setq org-attach-id-dir "~/org/attachments/")
|
||||
|
||||
|
@ -679,7 +701,7 @@ before packages are loaded."
|
|||
(lambda ()
|
||||
(visual-line-mode 1)))
|
||||
|
||||
(setq org-agenda-files '("~/org/"))
|
||||
(setq org-agenda-files '("~/org/grocery.org" "~/org/todos.org" "~/org/inbox.org"))
|
||||
(use-package org-roam
|
||||
:ensure nil
|
||||
:custom
|
||||
|
@ -691,10 +713,9 @@ before packages are loaded."
|
|||
|
||||
(org-roam-capture-templates
|
||||
'(("d" "default" plain
|
||||
"%?\n\n\n* References:\n"
|
||||
"%?\n\n\n* Thoughts\n\n* References:\n"
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+filetags:\n")
|
||||
:unnarowed t)))
|
||||
"#+title: ${title}\n#+filetags:\n"))))
|
||||
:config
|
||||
(setq org-roam-completion-everywhere t)
|
||||
(setq org-roam-database-connector 'sqlite-builtin)
|
||||
|
@ -705,6 +726,8 @@ before packages are loaded."
|
|||
|
||||
;; today capture
|
||||
(spacemacs/set-leader-keys
|
||||
;; "aow" #'my/org-refile-or-create-file
|
||||
"aorR" 'my-org-roam-refile
|
||||
"aordN" 'org-roam-dailies-capture-today)
|
||||
|
||||
(use-package org-roam-dailies
|
||||
|
@ -723,6 +746,14 @@ before packages are loaded."
|
|||
;; "xelatex -interaction nonstopmode -output-directory %o %f"
|
||||
;; "xelatex -interaction nonstopmode -output-directory %o %f"))
|
||||
|
||||
(defun my/org-capture-close-frame-for-specific-templates ()
|
||||
"Close the capture window only for specific templates."
|
||||
(let ((close-keys '("w" "L"))) ;; Список ключей шаблонов
|
||||
(when (member (org-capture-get :key) close-keys) ;; Проверка, входит ли ключ в список
|
||||
(delete-frame))))
|
||||
|
||||
(add-hook 'org-capture-after-finalize-hook 'my/org-capture-close-frame-for-specific-templates)
|
||||
|
||||
(setq org-capture-templates
|
||||
'(
|
||||
("p" "Private"
|
||||
|
@ -730,29 +761,19 @@ before packages are loaded."
|
|||
"* %?"
|
||||
:empty-lines 0)
|
||||
|
||||
("j" "Work Log Entry"
|
||||
entry (file+datetree "~/org/work-log.org")
|
||||
"* %?"
|
||||
:empty-lines 0)
|
||||
|
||||
("l" "Link"
|
||||
("i" "Inbox"
|
||||
entry (file+headline "~/org/inbox.org" "Inbox")
|
||||
"* %U %?\n %:annotation\n %:link"
|
||||
:empty-lines 0)
|
||||
|
||||
("n" "Note"
|
||||
entry (file+headline "~/org/notes.org" "Random Notes")
|
||||
"** %?"
|
||||
"* [%<%Y-%m-%d>] %U %? :inbox: \n %:annotation\n %:link"
|
||||
:empty-lines 0)
|
||||
|
||||
("r" "Grocery list"
|
||||
entry (file+headline "~/org/grocery.org" "Grocery list")
|
||||
"* NEED2BUY [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
|
||||
"* NEED2BUY [#C] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
|
||||
:empty-lines 0)
|
||||
|
||||
("g" "General To-Do"
|
||||
entry (file+headline "~/org/todos.org" "General Tasks")
|
||||
"* TODO [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
|
||||
"* TODO [#C] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
|
||||
:empty-lines 0)
|
||||
|
||||
("m" "Meeting"
|
||||
|
@ -765,18 +786,18 @@ before packages are loaded."
|
|||
|
||||
("c" "Code To-Do"
|
||||
entry (file+headline "~/org/todos.org" "Code Related Tasks")
|
||||
"* TODO [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n%i\nProposed Solution:\n"
|
||||
"* TODO [#C] %?\n:PROPERTIES:\n:Created: %T\n:END:\n%i\nProposed Solution:\n"
|
||||
:empty-lines 0)
|
||||
|
||||
|
||||
("w" "Selected web capture"
|
||||
entry (file+headline "~/org/web-selection.org" "Selected web capture")
|
||||
"* %^{Title}\nSource: %u, %:link\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?"
|
||||
entry (file+headline "~/org/inbox.org" "Selected web capture")
|
||||
"* [%<%Y-%m-%d>] %^{Title} :inbox:\nSource: %u, %:link\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?"
|
||||
:empty-lines 1)
|
||||
|
||||
("L" "Unselected web capture"
|
||||
entry (file+headline "~/org/web-links.org" "Web links")
|
||||
"* %(transform-square-brackets-to-round-ones \"%:description\")%?\n:PROPERTIES:\n:Created: %T\n:END:\n- %:link\n"
|
||||
entry (file+headline "~/org/inbox.org" "Web links")
|
||||
"* [%<%Y-%m-%d>] %(transform-square-brackets-to-round-ones \"%:description\")%? :inbox:\n- %:link\n"
|
||||
:empty-lines 1)))
|
||||
|
||||
(setq org-todo-keywords
|
||||
|
@ -796,58 +817,62 @@ before packages are loaded."
|
|||
|
||||
|
||||
;; Tags
|
||||
(setq org-tag-alist '(
|
||||
;; context
|
||||
(:startgroup)
|
||||
("@shop" . ?s)
|
||||
("@home" . ?h)
|
||||
("@outdoor" . ?o)
|
||||
("@any" . ?a)
|
||||
("@meeting" . ?m)
|
||||
(:endgroup)
|
||||
(setq org-tag-alist '
|
||||
(
|
||||
;; context
|
||||
(:startgroup)
|
||||
("@shop" . ?s)
|
||||
("@home" . ?h)
|
||||
("@outdoor" . ?o)
|
||||
("@any" . ?a)
|
||||
("@meeting" . ?m)
|
||||
(:endgroup)
|
||||
|
||||
;; basic tags
|
||||
(:startgroup)
|
||||
("chores" . ?C)
|
||||
("meeting" . ?M)
|
||||
("finance" . ?F)
|
||||
("sport" . ?S)
|
||||
("code" . ?O)
|
||||
("social" . ?I)
|
||||
("productivity" . ?P)
|
||||
("study" . ?U)
|
||||
("privacy" . ?R)
|
||||
("family" . ?A)
|
||||
("travel" . ?T)
|
||||
("life" . ?L)
|
||||
("health" . ?H)
|
||||
("friends" . ?E)
|
||||
("hobby" . ?B)
|
||||
("research" . ?G)
|
||||
("article" . ?I)
|
||||
("job" . ?J)
|
||||
(:endgroup)
|
||||
;; basic tags
|
||||
(:startgroup)
|
||||
("chores" . ?C)
|
||||
("meeting" . ?M)
|
||||
("finance" . ?F)
|
||||
("sport" . ?S)
|
||||
("code" . ?O)
|
||||
("social" . ?I)
|
||||
("productivity" . ?P)
|
||||
("study" . ?U)
|
||||
("privacy" . ?R)
|
||||
("family" . ?A)
|
||||
("travel" . ?T)
|
||||
("life" . ?L)
|
||||
("health" . ?H)
|
||||
("friends" . ?E)
|
||||
("hobby" . ?B)
|
||||
("research" . ?G)
|
||||
("article" . ?I)
|
||||
("job" . ?J)
|
||||
(:endgroup)
|
||||
|
||||
;; Special tags
|
||||
("CRITICAL" . ?X)
|
||||
;; Special tags
|
||||
("CRITICAL" . ?X)
|
||||
|
||||
;; other tags
|
||||
("backend")
|
||||
("broken_code")
|
||||
("frontend")
|
||||
("hike")
|
||||
("cycle")
|
||||
("pkm")
|
||||
("pentest")
|
||||
("immigration")
|
||||
("devops")
|
||||
("pet")
|
||||
("accomplishment")
|
||||
("music")
|
||||
("youtube")
|
||||
("trash")
|
||||
("devsecops")
|
||||
))
|
||||
;; other tags
|
||||
("backend")
|
||||
("broken_code")
|
||||
("frontend")
|
||||
("hike")
|
||||
("cycle")
|
||||
("pkm")
|
||||
("pentest")
|
||||
("immigration")
|
||||
("devops")
|
||||
("pet")
|
||||
("accomplishment")
|
||||
("music")
|
||||
("youtube")
|
||||
("trash")
|
||||
("devsecops")
|
||||
("book")
|
||||
("movie")
|
||||
("inbox")
|
||||
))
|
||||
|
||||
|
||||
;; Tag colors
|
||||
|
@ -892,10 +917,12 @@ before packages are loaded."
|
|||
nil)))
|
||||
|
||||
(setq org-agenda-skip-deadline-if-done t)
|
||||
(setq org-agenda-skip-timestamp-if-done t)
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(
|
||||
|
||||
|
||||
;; Daily Agenda & TODOs
|
||||
("d" "Daily agenda and all TODOs"
|
||||
|
||||
|
@ -931,7 +958,8 @@ before packages are loaded."
|
|||
(org-agenda-remove-tags t)
|
||||
(org-agenda-span 7)
|
||||
(org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'todo 'done))
|
||||
'(org-agenda-skip-entry-if 'todo 'done)
|
||||
'(org-agenda-skip-entry-if 'regexp ":inbox:"))
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -942,6 +970,10 @@ before packages are loaded."
|
|||
(org-agenda-prefix-format " %t %s")
|
||||
(org-agenda-overriding-header "CURRENT STATUS")
|
||||
|
||||
(org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'regexp ":inbox:"))
|
||||
|
||||
|
||||
;; Define the super agenda groups (sorts by order)
|
||||
(org-super-agenda-groups
|
||||
'(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
! Xft.dpi: 160
|
||||
! rofi.dpi: 160
|
||||
! Xft.dpi: 120
|
||||
! rofi.dpi: 120
|
||||
|
||||
Xft.autohint: 0
|
||||
Xft.lcdfilter: lcddefault
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
## qt5ct settings
|
||||
export QT_QPA_PLATFORMTHEME="qt5ct"
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||
export QT_ENABLE_HIGHDPI_SCALING=0
|
||||
# export QT_SCALE_FACTOR=1
|
||||
export QT_FONT_DPI=96
|
||||
## cursor size
|
||||
export XCURSOR_SIZE=32
|
||||
|
|
Loading…
Add table
Reference in a new issue