20250521.1747780314
This commit is contained in:
parent
54023cae23
commit
70605ab838
9 changed files with 124 additions and 28 deletions
|
@ -23,7 +23,7 @@
|
|||
;;
|
||||
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
||||
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 12.0))
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 11.0))
|
||||
;;
|
||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
||||
|
@ -79,6 +79,7 @@
|
|||
(setq org-attach-method 'cp) ;; copy file to an attachments dir.
|
||||
(setq org-attach-id-dir "~/org/attachments/")
|
||||
|
||||
(setq org-export-with-broken-links t)
|
||||
(setq org-adapt-indentation t)
|
||||
(setq org-startup-indented t)
|
||||
(setq org-indent-mode t)
|
||||
|
@ -125,26 +126,60 @@
|
|||
;; For company-mode users,
|
||||
;; (add-to-list 'company-backends 'hledger-company)
|
||||
|
||||
(use-package! org-roam
|
||||
;; :ensure nil
|
||||
:custom
|
||||
(org-roam-directory "~/org/roam/")
|
||||
(org-roam-capture-templates
|
||||
'(("d" "default" plain
|
||||
"%?\n\n\n* Key Features\n* Problems\n* Impact\n* Related:\n\n* References:\n"
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+filetags:\n#+date: %U\n"))))
|
||||
(custom-set-faces
|
||||
'((org-roam-link org-roam-link-current)
|
||||
:foreground "#e24888" :underline t))
|
||||
:config
|
||||
;; (org-roam-db-autosync-mode)
|
||||
(setq org-roam-completion-everywhere t)
|
||||
(setq org-roam-database-connector 'sqlite-builtin)
|
||||
(setq org-roam-db-node-include-function
|
||||
(lambda ()
|
||||
(not (member "ATTACH" (org-get-tags)))))
|
||||
)
|
||||
(require 'org-download)
|
||||
(add-hook 'dired-mode-hook 'org-download-enable)
|
||||
|
||||
;; (use-package! org-roam
|
||||
;; ;; :ensure nil
|
||||
;; :custom
|
||||
;; (org-roam-directory "~/org/roam/")
|
||||
;; (org-roam-capture-templates
|
||||
;; '(("d" "default" plain
|
||||
;; "%?\n\n\n* Key Features\n* Problems\n* Impact\n* Related:\n\n* References:\n"
|
||||
;; :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
;; "#+title: ${title}\n#+filetags:\n#+date: %U\n"))))
|
||||
;; (custom-set-faces
|
||||
;; '((org-roam-link org-roam-link-current)
|
||||
;; :foreground "#e24888" :underline t))
|
||||
;; :config
|
||||
;; ;; (org-roam-db-autosync-mode)
|
||||
;; (setq org-roam-completion-everywhere t)
|
||||
;; (setq org-roam-database-connector 'sqlite-builtin)
|
||||
;; (setq org-roam-db-node-include-function
|
||||
;; (lambda ()
|
||||
;; (not (member "ATTACH" (org-get-tags)))))
|
||||
;; )
|
||||
|
||||
(defvar my/blog-post-directory "~/fz0x1.wtf/posts/"
|
||||
"Directory for new blog posts captured with org-capture.")
|
||||
|
||||
(defconst my/cyr->lat
|
||||
'((?а . "a") (?б . "b") (?в . "v") (?г . "g") (?д . "d") (?е . "e") (?ё . "e")
|
||||
(?ж . "zh") (?з . "z") (?и . "i") (?й . "i") (?к . "k") (?л . "l") (?м . "m")
|
||||
(?н . "n") (?о . "o") (?п . "p") (?р . "r") (?с . "s") (?т . "t") (?у . "u")
|
||||
(?ф . "f") (?х . "h") (?ц . "ts") (?ч . "ch") (?ш . "sh") (?щ . "sch")
|
||||
(?ъ . "") (?ы . "y") (?ь . "") (?э . "e") (?ю . "yu") (?я . "ya")))
|
||||
|
||||
|
||||
(defun my/slugify (str)
|
||||
(let ((res (mapconcat
|
||||
(lambda (ch) (or (cdr (assoc ch my/cyr->lat))
|
||||
(char-to-string ch)))
|
||||
(string-to-list (downcase str)) "")))
|
||||
(setq res (replace-regexp-in-string "[^a-z0-9-]+" "-" res))
|
||||
(setq res (replace-regexp-in-string "-\\{2,\\}" "-" res))
|
||||
(string-trim res "-+" "-+")))
|
||||
|
||||
(defvar my/blog-last-title ""
|
||||
"origin title var")
|
||||
|
||||
(defun my/blog-post-path ()
|
||||
(let* ((title (read-string "Article name: "))
|
||||
(slug (my/slugify title))
|
||||
(date (format-time-string "%Y-%m-%d"))
|
||||
(file (format "%s-%s.org" date slug)))
|
||||
(setq my/blog-last-title title)
|
||||
(expand-file-name file my/blog-post-directory)))
|
||||
|
||||
(setq org-default-priority ?D)
|
||||
|
||||
|
@ -214,6 +249,12 @@
|
|||
"* [%<%Y-%m-%d>] [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]]\n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n Source: %:link\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n%?"
|
||||
:empty-lines 0)
|
||||
|
||||
("b" "Blog post" plain
|
||||
(file my/blog-post-path)
|
||||
"#+title: %(or my/blog-last-title \"\")\n#+date: %U\n\n%?"
|
||||
:empty-lines 1
|
||||
:unnarrowed t)
|
||||
|
||||
("L" "Unselected web capture"
|
||||
entry
|
||||
(file+headline "~/org/inbox.org" "Web links")
|
||||
|
@ -291,6 +332,7 @@
|
|||
("book")
|
||||
("movie")
|
||||
("inbox")
|
||||
("abandoned")
|
||||
))
|
||||
|
||||
|
||||
|
@ -319,6 +361,7 @@
|
|||
("meeting" . (:foreground "magenta" :weight bold))
|
||||
("CRITICAL" . (:foreground "red1" :weight bold))
|
||||
("job" . (:foreground "medium spring green" :weight bold))
|
||||
("abandoned" . (:foreground "medium spring grey18" :weight bold))
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -364,7 +407,7 @@ PRIORITY may be one of the characters ?A, ?B, or ?C."
|
|||
;; ------------------ Priority A ------------------
|
||||
(tags "PRIORITY=\"A\""
|
||||
((org-agenda-skip-function
|
||||
'(or (org-agenda-skip-entry-if 'todo 'done)
|
||||
'(or (org-agenda-skip-entry-if 'todo 'done)
|
||||
(org-agenda-skip-entry-if 'todo '("STRT" "HOLD"))))
|
||||
(org-agenda-overriding-header "High‑priority unfinished tasks:")))
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
|
@ -84,7 +84,7 @@
|
|||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
(spell +hunspell +everywhere +flyspell) ; tasing you for misspelling misspelling
|
||||
(spell +hunspell +flyspell) ; tasing you for misspelling misspelling
|
||||
grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
|
@ -154,7 +154,7 @@
|
|||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
(org +roam2 +pretty +habits +journal) ; organize your plain life in plain text
|
||||
(org +habits +journal) ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;graphviz ; diagrams for confusing yourself even more
|
||||
|
|
|
@ -55,3 +55,5 @@
|
|||
(package! org-super-links
|
||||
:recipe (:host github :repo "toshism/org-super-links"))
|
||||
(package! hledger-mode)
|
||||
(package! htmlize)
|
||||
(package! org-download)
|
||||
|
|
|
@ -147,3 +147,5 @@ fi
|
|||
source $HOME/.zshrc-additional
|
||||
source $HOME/.zshrc-secrets
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
[ -f "/home/fz0x1/.ghcup/env" ] && . "/home/fz0x1/.ghcup/env" # ghcup-env
|
|
@ -14,11 +14,13 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
|||
elif [[ "$(uname)" == "Linux" ]]; then
|
||||
case $mode in
|
||||
full)
|
||||
maim -o $screenshot
|
||||
maim -o "$screenshot"
|
||||
echo "$screenshot" | xsel --clipboard --input
|
||||
notify-send "Screenshot created: $screenshot"
|
||||
;;
|
||||
region)
|
||||
maim -o --select $screenshot
|
||||
maim -o --select "$screenshot"
|
||||
echo "$screenshot" | xsel --clipboard --input
|
||||
notify-send "Screenshot created: $screenshot"
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue