From f2aa8f935cd82058bf79a2134e1c533808c05ffb Mon Sep 17 00:00:00 2001 From: cho Date: Thu, 28 Sep 2023 20:09:27 +0700 Subject: [PATCH] Revert "add org-download and config" This reverts commit 09167cd5c42916472115b6fa0fb2a36ebbefa24d. --- home/default/.config/doom/config.el | 44 +++++--------------- home/default/.config/doom/packages.el | 1 - home/default/.local/bin/convert-paste-png.sh | 10 ----- 3 files changed, 10 insertions(+), 45 deletions(-) delete mode 100755 home/default/.local/bin/convert-paste-png.sh diff --git a/home/default/.config/doom/config.el b/home/default/.config/doom/config.el index a0600b7..9a572ae 100644 --- a/home/default/.config/doom/config.el +++ b/home/default/.config/doom/config.el @@ -33,15 +33,14 @@ ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: -;(setq doom-theme 'doom-tomorrow-night) +(setq doom-theme 'doom-tomorrow-night) ;(setq doom-theme 'doom-one) ;(setq doom-theme 'doom-wilmersdorf) ;(setq doom-theme 'doom-plain-dark) ;(setq doom-theme 'doom-feather-dark) -;(setq doom-theme 'doom-monokai-ristretto) ;(setq doom-theme 'doom-plain) -(setq doom-theme 'doom-flatwhite) +;(setq doom-theme 'doom-flatwhite) ;; 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'. @@ -196,14 +195,11 @@ ; (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag))) ;;; org-capture stuff - ;;; examples: file:~/.emacs.d/modules/lang/org/config.el - ; my location of the todo.org file (setq +org-capture-todo-file "ag/todo.org") - + ;; this sets Personal notes to refile instead (defvar +org-capture-refile-file "refile.org") (setq +org-capture-refile-file (expand-file-name +org-capture-refile-file org-directory)) - ; refile.org at the root of org-directory ;(add-to-list 'org-capture-templates ; '(("s" "Slipbox" entry (file "braindump/org/inbox.org") @@ -216,20 +212,16 @@ (setq org-capture-templates '(("t" "Personal todo" entry (file+headline +org-capture-todo-file "todo") - "* [ ] %?\n%i\n%a" :prepend t) - ("T" "Personal todo (no link)" entry + "* [ ] %?\n%i\n%a") + ("T" "Personal todo (single)" entry (file+headline +org-capture-todo-file "todo") - "* [ ] %?\n" :prepend t) + "* [ ] %?\n") - ;;; i never use this - ;("n" "Personal notes" entry - ;(file+headline +org-capture-notes-file "Inbox") - ;"* %u %?\n%i\n%a" :prepend t) - ("r" "Personal refile file" entry + ("n" "Personal notes" entry (file +org-capture-refile-file) "* %u %?\n%i\n%a" :prepend t) - ;; using org-journal atm, i will likely never use this + ;; using org-journal atm.. ;("j" "Journal" entry ;(file+olp+datetree +org-capture-journal-file) ;"* %U %?\n%i\n%a" :prepend t) @@ -249,7 +241,6 @@ (file+headline +org-capture-project-changelog-file "Unreleased") "* %U %?\n%i\n%a" :prepend t) - ;; reference for function: [[file:~/.emacs.d/modules/lang/org/autoload/org-capture.el::defun +org--capture-central-file (file project]] ;; Will use {org-directory}/{+org-capture-projects-file} and store ;; these under {ProjectName}/{Tasks,Notes,Changelog} headings. They ;; support `:parents' to specify what headings to put them under, e.g. @@ -272,16 +263,13 @@ :prepend t) ;; org books / general logging - ("b" "Book log / General log (org)" item (function org-books-visit-book-log) + ("b" "Book log" item (function org-books-visit-book-log) "- %U %?" :prepend t) ;; zettelkasten ("s" "Slipbox" entry (file "roam/inbox.org") - "* %U %?\n") - ("S" "Slipbox link" entry (file "roam/inbox.org") - "* %U %?\n %i\n %a"))) + "* %?\n"))) - (setq org-attach-directory "~/notebook/images/attach/") ) ;;; end of (!after org ... @@ -329,15 +317,3 @@ "Archive all done tasks." (interactive) (org-map-entries 'org-archive-subtree "/DONE" 'file)) - -(require 'org-download) -(setq-default - org-download-method 'directory - ;; org-download-screenshot-method "grimshot save window %s" - ;; org-download-screenshot-method "wl-paste -t image/png > '%s'" - ;; below script is available on dotfiles: ../.local/bin - org-download-screenshot-method "convert-paste-png.sh '%s'" - org-download-image-dir "~/notebook/images/org-download" - org-download-heading-lvl nil - org-download-timestamp "%Y%m%d-%H%M%S_") -(add-hook 'dired-mode-hook 'org-download-enable) diff --git a/home/default/.config/doom/packages.el b/home/default/.config/doom/packages.el index ac213ee..6e4894f 100644 --- a/home/default/.config/doom/packages.el +++ b/home/default/.config/doom/packages.el @@ -56,7 +56,6 @@ ;(package! org :pin "ca873f7") (package! org-books) -(package! org-download) ;;; customized to support repeated tasks, see https://github.com/akhramov/org-wild-notifier.el/issues/41 (package! org-wild-notifier diff --git a/home/default/.local/bin/convert-paste-png.sh b/home/default/.local/bin/convert-paste-png.sh deleted file mode 100755 index f788741..0000000 --- a/home/default/.local/bin/convert-paste-png.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -wl-paste -t image > /tmp/convert-paste-png.data -#convert /tmp/convert-paste-png.data -format png "$1" - -case "$(file --dereference --brief --mime-type -- "/tmp/convert-paste-png.data")" in - image/jpg|image/jpeg) convert /tmp/convert-paste-png.data -format png "$1" ;; - image/png) wl-paste -t image/png > "$1" ;; -esac -