From 805ba8782d541258507b58a7c1e1faa68ef8c5d9 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 26 Aug 2023 14:18:12 +0300 Subject: emacs: Add org-insert-book and format org-roam config --- emacs.org | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'emacs.org') diff --git a/emacs.org b/emacs.org index 3d9707d..2c9e70d 100755 --- a/emacs.org +++ b/emacs.org @@ -385,9 +385,18 @@ Generate a random password between 20 and 40 characters (lambda () (not (or (member "journal" (org-get-tags)) (member "memorize" (org-get-tags)))))) -#+end_src -*** Keybindings -#+begin_src emacs-lisp + + ;; Functions + (defun org-insert-book () + "Insert org-link from ~/Library for book" + (interactive) + (let ((book-path (read-file-name "Book: " "~/Library/")) + (book-description (read-string "Title: "))) + (org-insert-link nil book-path book-description))) + + ;;; Keybindings + (define-key org-mode-map (kbd "C-c b") 'org-insert-book) + ;; Set maps (define-prefix-command 'thanos/notes) (global-set-key (kbd "C-c n") 'thanos/notes) @@ -408,9 +417,8 @@ Generate a random password between 20 and 40 characters (define-key org-mode-map (kbd "C-c C-.") 'org-roam-tag-add) (define-key org-mode-map (kbd "C-c i") 'org-id-get-create) -#+end_src -*** Templates -#+begin_src emacs-lisp + + ;; Templates (setq org-roam-capture-templates '(("d" "default" plain "%?" @@ -1359,13 +1367,20 @@ Create function to watch videos using ~mpv~ menu list)) (defun erc-libera () - (interactive) "Login to liberachat with erc." + (interactive) (erc-tls :server "irc.libera.chat" :port 6697 :nick "thanosapollo" :user "thanosapollo" :password (password-store-get "liberachat/thanos_apollo"))) + (defun erc-mouse () + "Login to liberachat with erc." + (interactive) + (erc-tls :server "irc.myanonamouse.net" :port 6697 + :nick "Skylosophos" + :user "Skylosophos" + :password (password-store-get "myanonamouse.net/irc"))) (define-key thanos/applications-map (kbd "i") 'erc-libera) #+end_src -- cgit v1.2.3