From 3dd2b7fb70f971a1f3956357743e75da7f8f17ef Mon Sep 17 00:00:00 2001 From: Crepu Date: Mon, 12 Feb 2024 22:00:10 -0300 Subject: [PATCH] Se agregan las configuraciones del tarro --- tarro/custom.el | 15 ++ tarro/init.el | 317 +++++++++++++++++++++++++++++++ tarro/templates/roam/author.org | 18 ++ tarro/templates/roam/concept.org | 14 ++ tarro/templates/roam/quote.org | 15 ++ 5 files changed, 379 insertions(+) create mode 100644 tarro/custom.el create mode 100644 tarro/init.el create mode 100644 tarro/templates/roam/author.org create mode 100644 tarro/templates/roam/concept.org create mode 100644 tarro/templates/roam/quote.org diff --git a/tarro/custom.el b/tarro/custom.el new file mode 100644 index 0000000..941df57 --- /dev/null +++ b/tarro/custom.el @@ -0,0 +1,15 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(delete-selection-mode 1) + '(package-selected-packages + (quote + (org-roam-ui org-roam org-tree-slide hide-mode-line hide-lines org-bullets citar markdown-mode auctex elfeed-org elfeed pdf-view-restore pdf-tools dired-hide-dotfiles smartparens modus-themes magit which-key corfu-terminal corfu embark orderless marginalia vertico use-package)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/tarro/init.el b/tarro/init.el new file mode 100644 index 0000000..f996f7d --- /dev/null +++ b/tarro/init.el @@ -0,0 +1,317 @@ +;; Initw.el -*- lexical-binding: t; -*- + +(menu-bar-mode -1) ;; Oculta la barra del menú +(scroll-bar-mode -1) +(horizontal-scroll-bar-mode nil) ;; Oculta la barra de desplazamiento +(tool-bar-mode -1) ;; Oculta la barra de herramientas +(customize-set-variable 'delete-selection-mode 1) ;; Borra la región seleccionada +(column-number-mode) ;; Número de la columna en la línea de modo +(global-visual-line-mode 1) +(global-auto-revert-mode 1) +(set-fringe-mode 0) +(fset 'yes-or-no-p 'y-or-n-p) + +(setq-default cursor-in-non-selected-windows nil + frame-title-format '("%f [%m]")) +(setq default-fill-column 100 + make-backup-files nil + inhibit-startup-message t + custom-file "~/.emacs.d/custom.el" + global-auto-revert-non-file-buffers t + message-kill-buffer-on-exit t + large-file-warning-threshold nil) +(load custom-file) + +(require 'package) +(setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("nongnu" . "https://elpa.nongnu.org/nongnu/") + ("elpa" . "https://elpa.gnu.org/packages/"))) +(package-initialize) +(unless package-archive-contents + (package-refresh-contents)) + +(unless (package-installed-p 'use-package) + (package-install 'use-package)) +(require 'use-package) +(setq use-package-always-ensure t) + +(use-package vertico + :ensure t + :init + (vertico-mode)) + +(use-package vertico-directory + :after vertico + :ensure nil + :bind (:map vertico-map + ("RET" . vertico-directory-enter) + ("DEL" . vertico-directory-delete-char) + ("M-DEL" . vertico-directory-delete-word)) + :hook (rfn-eshadow-update-overlay . vertico-directory-tidy)) + +(use-package savehist + :init + (savehist-mode)) + +(use-package marginalia + :after vertico + :ensure t + :init + (marginalia-mode) + :custom + (marginalia-align 'right)) + +(use-package orderless + :ensure t + :after vertico + :custom + (completion-styles '(orderless basic))) + +(use-package embark + :ensure t + :bind (("C-." . embark-act) + ("C-;" . embark-dwim) + ("C-h B" . embark-bindings)) + :init + (setq prefix-help-command #'embark-prefix-help-command) + :config + (add-to-list 'display-buffer-alist + '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" + nil + (window-parameters (mode-line-format . none))))) + +(use-package corfu + :custom + (corfu-auto t) + (corfu-quit-no-match t) + (corfu-separator ?\s) + :init + (global-corfu-mode)) + +(use-package corfu-terminal + :config + (unless (display-graphic-p) + (corfu-terminal-mode +1))) + +(use-package which-key + :defer 0 + :config + (which-key-mode) + (setq which-key-idle-delay 0.3)) + +(use-package magit + :bind ("C-x g" . magit-status)) + +(use-package modus-themes + :if window-system + :init + (load-theme 'modus-vivendi t)) + +(use-package smartparens + :hook (prog-mode . smartparens-mode)) + +(use-package dired + :ensure nil + :defer 1 + :config + (setq dired-recursive-copies 'always + dired-listing-switches "--group-directories-first -alh")) + +(use-package dired-hide-dotfiles + :after dired + :hook (dired-mode . dired-hide-dotfiles-mode) + :config + (define-key dired-mode-map "." #'dired-hide-dotfiles-mode)) + +(use-package pdf-tools + :defer t) + +(pdf-loader-install) + +(use-package pdf-view-restore + :after pdf-tools + :config + (add-hook 'pdf-view-mode-hook 'pdf-view-restore-mode)) + +(use-package elfeed + :no-require t + :bind ("C-x w" . elfeed)) + +(use-package elfeed-org + :ensure t + :after elfeed + :config + (elfeed-org) + (setq rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org"))) + +(use-package latex + :ensure auctex + :defer t + :custom + (TeX-source-correlate-mode t) + (TeX-source-correlate-start-server t) + :config + (setq TeX-view-program-selection '((output-pdf "PDF Tools"))) + (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)) + +(use-package markdown-mode + :ensure t + :commands (markdown-mode gfm-mode) + :mode (("README\\.md\\'" . gfm-mode) + ("\\.md\\'" . markdown-mode) + ("\\.markdown\\'" . markdown-mode))) + +(use-package org + :commands (org-capture org-agenda) + :bind (("C-c l" . org-store-link) + ("C-c a" . org-agenda) + ("C-c c" . org-capture)) + :custom + (org-export-backends + '(beamer html icalendar latex md odt)) + (org-capture-templates + '(("h" "Por hacer" entry + (file+headline "agenda.org" "Cosas por hacer") + "** TODO %?") + ("r" "Reunión" entry + (file+headline "agenda.org" "Cosas por hacer") + "** REUNIÓN %^{¿De qué?|JGM|HSS|BANDA|DOJO|VECINOS}\n %^T") + ("e" "Evento") + ("ec" "Cumpleaños" entry + (file+headline "agenda.org" "Eventos") + "** CUMPLE %^{¿De quién?}\n SCHEDULED %^T") + ("ef" "Funeral" entry + (file+headline "agenda.org" "Eventos") + "** FUNERAL %^{¿De quién?}\n SCHEDULED %^T") + ("em" "Matrimonio" entry + (file+headline "agenda.org" "Eventos") + "** MATRI %^{¿De quién?}\n SCHEDULED %^T"))) + :config + (setq org-agenda-files '("~/org/agenda.org") + org-ellipsis " ▾" + org-footnote-auto-adjust t + org-return-follows-link t + org-log-done 'time + org-capture-bookmark nil + org-html-validation-link nil + org-startup-indented t + org-startup-folded nil)) + +(with-eval-after-load 'org + (org-babel-do-load-languages + 'org-babel-load-languages + '((C . t) + (scheme . t) + (python . t) + (shell . t))) + (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)) + +(use-package citar + :defer t + :bind (("C-c b" . citar-insert-citation) + ("M-p" . citar-org-update-prefix-suffix) + :map minibuffer-local-map + ("M-b" . citar-insert-preset)) + :custom + (citar-bibliography '("./referencias.bib")) + :hook + (LaTeX-mode . citar-capf-setup) + (org-mode . citar-capf-setup)) + +(use-package org-bullets + :no-require t + :custom + (org-bullets-bullet-list '("◉" "●" "○" "●" "○" "●"))) + +(use-package hide-lines) + +(use-package hide-mode-line + :defer t) + +(defun terror/slide-setup () + (global-hl-line-mode -1) + (setq org-hide-emphasis-markers t) + (org-bullets-mode 1) + (setq text-scale-mode-amount 3) + (text-scale-mode 1) + (set-frame-parameter (selected-frame) + 'internal-border-width 75) + (org-display-inline-images) + (toggle-frame-fullscreen) + (hide-mode-line-mode 1) + (hide-lines-matching "#\\+begin") + (hide-lines-matching "#\\+end")) + +(defun terror/slide-end () + (global-hl-line-mode 1) + (setq org-hide-emphasis-markers nil) + (org-bullets-mode -1) + (setq text-scale-mode-amount 0) + (text-scale-mode -1) + (set-frame-parameter (selected-frame) + 'internal-border-width 20) + (toggle-frame-fullscreen) + (hide-mode-line-mode -1) + (hide-lines-show-all) + (org-fold-show-all)) + +(use-package org-tree-slide + :after org + :bind ("C-c p" . org-tree-slide-mode) + :hook ((org-tree-slide-play . terror/slide-setup) + (org-tree-slide-stop . terror/slide-end)) + :config + (setq org-tree-slide-slide-in-effect nil + org-image-actual-width nil + org-tree-slide-header t + org-tree-slide-breadcrumbs " > " + org-tree-slide-activate-message "Let's begin..." + org-tree-slide-deactivate-message "The end :)")) + +(use-package org-roam + :ensure t + :init + (setq org-roam-v2-ack t) + :custom + (org-roam-directory (file-truename "~/org/roam")) + (org-roam-capture-templates + '(("a" "Autor" plain + (file "~/.emacs.d/templates/roam/author.org") + :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" + "#+title: ${title}\n") + :unnarrowed t) + ("c" "Concepto" plain + (file "~/.emacs.d/templates/roam/concept.org") + :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" + "#+title: ${title}\n") + :unnarrowed t) + ("d" "Por defecto" plain + "%?" + :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t) + ("q" "Cita" plain + (file "~/.emacs.d/templates/roam/quote.org") + :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" + "#+title: ${title}\n") + :unnarrowed t))) + :bind (("C-c n l" . org-roam-buffer-toggle) + ("C-c n f" . org-roam-node-find) + ("C-c n i" . org-roam-node-insert) + ("C-c n g" . org-roam-ui-mode) + ("C-c n c" . org-roam-capture) + ("C-c n j" . org-roam-dailies-capture-today)) + :config + (setq org-roam-node-display-template + (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) + (org-roam-setup) + (require 'org-roam-protocol)) + +(use-package org-roam-ui + :after org-roam + :config + (setq org-roam-ui-sync-theme t + org-roam-ui-follow t + org-roam-ui-update-on-save t + org-roam-ui-open-on-start t)) + +;;; Happy hacking! ;;; diff --git a/tarro/templates/roam/author.org b/tarro/templates/roam/author.org new file mode 100644 index 0000000..f268ef5 --- /dev/null +++ b/tarro/templates/roam/author.org @@ -0,0 +1,18 @@ +#+cite_export: biblatex +#+bibliography: "~/Documentos/refs.bib" + +- *Nombre*: %^{Name} +- *Origen*: %^{Country} +- *Año*: %^{Year} + +* Pensamiento + +- %? + +* Obras + +* Recursos + +* Referencias + +#+print_bibliography: diff --git a/tarro/templates/roam/concept.org b/tarro/templates/roam/concept.org new file mode 100644 index 0000000..4bc9416 --- /dev/null +++ b/tarro/templates/roam/concept.org @@ -0,0 +1,14 @@ +#+cite_export: biblatex +#+bibliography: "~/Documentos/refs.bib" + +* Definición + +*${title}*: %? + +* Área + +* Recursos + +* Referencias + +#+print_bibliography: diff --git a/tarro/templates/roam/quote.org b/tarro/templates/roam/quote.org new file mode 100644 index 0000000..fdeb10b --- /dev/null +++ b/tarro/templates/roam/quote.org @@ -0,0 +1,15 @@ +#+cite_export: biblatex +#+bibliography: "~/Documentos/refs.bib" + +- Título :: %? +- Tags :: + +* ${title} + +#+begin_quote + +#+end_quote + +* Referencias + +#+print_bibliography: -- 2.39.5