diff options
author | Thanos Apollo <[email protected]> | 2023-08-26 14:18:12 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-26 14:18:12 +0300 |
commit | 805ba8782d541258507b58a7c1e1faa68ef8c5d9 (patch) | |
tree | 6d29944502cafe52e9158e7e487aa8de8459bcfb /emacs.org | |
parent | 83caa3ec03321d1a44a17b19ec13c588254bb63c (diff) |
emacs: Add org-insert-book and format org-roam config
Diffstat (limited to 'emacs.org')
-rwxr-xr-x | emacs.org | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -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 |