1 ;; Initw.el -*- lexical-binding: t; -*-
3 (menu-bar-mode -1) ;; Oculta la barra del menú
5 (horizontal-scroll-bar-mode nil) ;; Oculta la barra de desplazamiento
6 (tool-bar-mode -1) ;; Oculta la barra de herramientas
7 (customize-set-variable 'delete-selection-mode 1) ;; Borra la región seleccionada
8 (column-number-mode) ;; Número de la columna en la línea de modo
9 (global-visual-line-mode 1)
10 (global-auto-revert-mode 1)
12 (fset 'yes-or-no-p 'y-or-n-p)
14 (setq-default cursor-in-non-selected-windows nil
15 frame-title-format '("%f [%m]"))
16 (setq default-fill-column 100
18 inhibit-startup-message t
19 custom-file "~/.emacs.d/custom.el"
20 global-auto-revert-non-file-buffers t
21 message-kill-buffer-on-exit t
22 large-file-warning-threshold nil)
26 (setq package-archives '(("melpa" . "https://melpa.org/packages/")
27 ("nongnu" . "https://elpa.nongnu.org/nongnu/")
28 ("elpa" . "https://elpa.gnu.org/packages/")))
30 (unless package-archive-contents
31 (package-refresh-contents))
33 (unless (package-installed-p 'use-package)
34 (package-install 'use-package))
35 (require 'use-package)
36 (setq use-package-always-ensure t)
43 (use-package vertico-directory
46 :bind (:map vertico-map
47 ("RET" . vertico-directory-enter)
48 ("DEL" . vertico-directory-delete-char)
49 ("M-DEL" . vertico-directory-delete-word))
50 :hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
56 (use-package marginalia
62 (marginalia-align 'right))
64 (use-package orderless
68 (completion-styles '(orderless basic)))
72 :bind (("C-." . embark-act)
74 ("C-h B" . embark-bindings))
76 (setq prefix-help-command #'embark-prefix-help-command)
78 (add-to-list 'display-buffer-alist
79 '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
81 (window-parameters (mode-line-format . none)))))
86 (corfu-quit-no-match t)
91 (use-package corfu-terminal
93 (unless (display-graphic-p)
94 (corfu-terminal-mode +1)))
96 (use-package which-key
100 (setq which-key-idle-delay 0.3))
103 :bind ("C-x g" . magit-status))
105 (use-package modus-themes
108 (load-theme 'modus-vivendi t))
110 (use-package smartparens
111 :hook (prog-mode . smartparens-mode))
117 (setq dired-recursive-copies 'always
118 dired-listing-switches "--group-directories-first -alh"))
120 (use-package dired-hide-dotfiles
122 :hook (dired-mode . dired-hide-dotfiles-mode)
124 (define-key dired-mode-map "." #'dired-hide-dotfiles-mode))
126 (use-package pdf-tools
131 (use-package pdf-view-restore
134 (add-hook 'pdf-view-mode-hook 'pdf-view-restore-mode))
138 :bind ("C-x w" . elfeed))
140 (use-package elfeed-org
145 (setq rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org")))
151 (TeX-source-correlate-mode t)
152 (TeX-source-correlate-start-server t)
154 (setq TeX-view-program-selection '((output-pdf "PDF Tools")))
155 (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
157 (use-package markdown-mode
159 :commands (markdown-mode gfm-mode)
160 :mode (("README\\.md\\'" . gfm-mode)
161 ("\\.md\\'" . markdown-mode)
162 ("\\.markdown\\'" . markdown-mode)))
165 :commands (org-capture org-agenda)
166 :bind (("C-c l" . org-store-link)
167 ("C-c a" . org-agenda)
168 ("C-c c" . org-capture))
171 '(beamer html icalendar latex md odt))
172 (org-capture-templates
173 '(("h" "Por hacer" entry
174 (file+headline "agenda.org" "Cosas por hacer")
177 (file+headline "agenda.org" "Cosas por hacer")
178 "** REUNIÓN %^{¿De qué?|JGM|HSS|BANDA|DOJO|VECINOS}\n %^T")
180 ("ec" "Cumpleaños" entry
181 (file+headline "agenda.org" "Eventos")
182 "** CUMPLE %^{¿De quién?}\n SCHEDULED %^T")
183 ("ef" "Funeral" entry
184 (file+headline "agenda.org" "Eventos")
185 "** FUNERAL %^{¿De quién?}\n SCHEDULED %^T")
186 ("em" "Matrimonio" entry
187 (file+headline "agenda.org" "Eventos")
188 "** MATRI %^{¿De quién?}\n SCHEDULED %^T")))
190 (setq org-agenda-files '("~/org/agenda.org")
192 org-footnote-auto-adjust t
193 org-return-follows-link t
195 org-capture-bookmark nil
196 org-html-validation-link nil
197 org-startup-indented t
198 org-startup-folded nil))
200 (with-eval-after-load 'org
201 (org-babel-do-load-languages
202 'org-babel-load-languages
207 (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images))
211 :bind (("C-c b" . citar-insert-citation)
212 ("M-p" . citar-org-update-prefix-suffix)
213 :map minibuffer-local-map
214 ("M-b" . citar-insert-preset))
216 (citar-bibliography '("./referencias.bib"))
218 (LaTeX-mode . citar-capf-setup)
219 (org-mode . citar-capf-setup))
221 (use-package org-bullets
224 (org-bullets-bullet-list '("◉" "●" "○" "●" "○" "●")))
226 (use-package hide-lines)
228 (use-package hide-mode-line
231 (defun terror/slide-setup ()
232 (global-hl-line-mode -1)
233 (setq org-hide-emphasis-markers t)
235 (setq text-scale-mode-amount 3)
237 (set-frame-parameter (selected-frame)
238 'internal-border-width 75)
239 (org-display-inline-images)
240 (toggle-frame-fullscreen)
241 (hide-mode-line-mode 1)
242 (hide-lines-matching "#\\+begin")
243 (hide-lines-matching "#\\+end"))
245 (defun terror/slide-end ()
246 (global-hl-line-mode 1)
247 (setq org-hide-emphasis-markers nil)
248 (org-bullets-mode -1)
249 (setq text-scale-mode-amount 0)
251 (set-frame-parameter (selected-frame)
252 'internal-border-width 20)
253 (toggle-frame-fullscreen)
254 (hide-mode-line-mode -1)
255 (hide-lines-show-all)
258 (use-package org-tree-slide
260 :bind ("C-c p" . org-tree-slide-mode)
261 :hook ((org-tree-slide-play . terror/slide-setup)
262 (org-tree-slide-stop . terror/slide-end))
264 (setq org-tree-slide-slide-in-effect nil
265 org-image-actual-width nil
266 org-tree-slide-header t
267 org-tree-slide-breadcrumbs " > "
268 org-tree-slide-activate-message "Let's begin..."
269 org-tree-slide-deactivate-message "The end :)"))
271 (use-package org-roam
274 (setq org-roam-v2-ack t)
276 (org-roam-directory (file-truename "~/org/roam"))
277 (org-roam-capture-templates
279 (file "~/.emacs.d/templates/roam/author.org")
280 :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
281 "#+title: ${title}\n")
283 ("c" "Concepto" plain
284 (file "~/.emacs.d/templates/roam/concept.org")
285 :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
286 "#+title: ${title}\n")
288 ("d" "Por defecto" plain
290 :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
293 (file "~/.emacs.d/templates/roam/quote.org")
294 :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
295 "#+title: ${title}\n")
297 :bind (("C-c n l" . org-roam-buffer-toggle)
298 ("C-c n f" . org-roam-node-find)
299 ("C-c n i" . org-roam-node-insert)
300 ("C-c n g" . org-roam-ui-mode)
301 ("C-c n c" . org-roam-capture)
302 ("C-c n j" . org-roam-dailies-capture-today))
304 (setq org-roam-node-display-template
305 (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
307 (require 'org-roam-protocol))
309 (use-package org-roam-ui
312 (setq org-roam-ui-sync-theme t
314 org-roam-ui-update-on-save t
315 org-roam-ui-open-on-start t))
317 ;;; Happy hacking! ;;;