Compare commits
19 Commits
c82e9ce6fa
...
548475904f
| Author | SHA1 | Date | |
|---|---|---|---|
|
548475904f
|
|||
|
941c2b87a0
|
|||
|
256156fc99
|
|||
|
a9e92105e2
|
|||
|
4559fb9785
|
|||
|
984fd5c3a9
|
|||
|
910f42bb4a
|
|||
|
8ffe2ef07b
|
|||
|
325949c55d
|
|||
|
d649a7af4f
|
|||
|
ae47f02a35
|
|||
|
f56be80d37
|
|||
|
007998544d
|
|||
|
949e838ee4
|
|||
|
41f5a4cb4e
|
|||
|
15a2613fea
|
|||
|
3d17701e86
|
|||
|
8bfbb89c50
|
|||
|
a903e5f436
|
@@ -10,9 +10,6 @@
|
||||
;; Map elfeed to global keybinding
|
||||
(map! :leader :n "o e" #'=rss
|
||||
:desc "RSS reader")
|
||||
;; Map wallabag to global keybinding
|
||||
(map! :leader :n "o w" #'=wallabag
|
||||
:desc "Read saved articles")
|
||||
;; Keybindings for org-noter
|
||||
(map! :mode pdf-view-mode
|
||||
:n "i" #'org-noter-insert-note
|
||||
@@ -31,13 +28,11 @@
|
||||
;; Keybindings for next/previous buffer
|
||||
(map! :n "C-c j" #'previous-buffer)
|
||||
(map! :n "C-c k" #'next-buffer)
|
||||
;; Keybindings for citar
|
||||
(map! :leader :n "n B" #'citar-open-files
|
||||
:desc "Open associated PDF with bibliography entry")
|
||||
;; Keybindings for PlatformIO
|
||||
(map! :after platformio-mode
|
||||
:map platformio-mode-map
|
||||
(:localleader
|
||||
:desc "Compile the project" "c c" #'platformio-build
|
||||
:desc "Upload the project" "c u" #'platformio-upload
|
||||
:desc "Monitor the serial console" "c m" #'platformio-device-monitor))
|
||||
:desc "Monitor the serial console" "c m" #'platformio-device-monitor
|
||||
:desc "Upload data files" "c d" #'platformio-spiffs-upload))
|
||||
|
||||
11
+mail.el
11
+mail.el
@@ -18,14 +18,6 @@
|
||||
(smtpmail-smtp-user . "akasroua@gmail.com")
|
||||
(user-mail-address . "akasroua@gmail.com"))
|
||||
t)
|
||||
(set-email-account! "ugent"
|
||||
'((mu4e-sent-folder . "/ugent/sent")
|
||||
(mu4e-drafts-folder . "/ugent/drafts")
|
||||
(mu4e-trash-folder . "/ugent/trash")
|
||||
(mu4e-refile-folder . "/ugent/archive")
|
||||
(smtpmail-smtp-user . "amin.kasrouaouam@ugent.be")
|
||||
(user-mail-address . "amin.kasrouaouam@ugent.be"))
|
||||
t)
|
||||
(set-email-account! "disroot"
|
||||
'((mu4e-sent-folder . "/disroot/sent")
|
||||
(mu4e-drafts-folder . "/disroot/drafts")
|
||||
@@ -46,8 +38,7 @@
|
||||
;; Use shortcuts to access inboxes easily
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'(("/disroot/inbox" . ?d)
|
||||
("/gmail/inbox" . ?g)
|
||||
("/ugent/inbox" . ?u)))
|
||||
("/gmail/inbox" . ?g)))
|
||||
;; Change mu4e bookmarks
|
||||
(setq mu4e-bookmarks '((:name "Unread messages" :query "flag:unread AND NOT flag:trashed" :key 117)
|
||||
(:name "Today's messages" :query "date:today..now" :key 116)
|
||||
|
||||
30
+org.el
30
+org.el
@@ -17,13 +17,16 @@
|
||||
:init
|
||||
(setq org-agenda-skip-scheduled-if-done t
|
||||
org-agenda-skip-deadline-if-done t
|
||||
org-agenda-skip-scheduled-delay-if-deadline t
|
||||
org-agenda-skip-deadline-prewarning-if-scheduled t
|
||||
org-deadline-warning-days 0
|
||||
org-agenda-include-deadlines t
|
||||
org-agenda-tags-column 100
|
||||
org-agenda-block-separator nil
|
||||
org-agenda-compact-blocks t
|
||||
org-agenda-start-day nil
|
||||
org-agenda-span 1
|
||||
org-agenda-start-on-weekday nil)
|
||||
org-agenda-span 7
|
||||
org-agenda-start-on-weekday 0)
|
||||
(setq org-super-agenda-groups '((:name "Overdue"
|
||||
:deadline past
|
||||
:order 0)
|
||||
@@ -44,8 +47,8 @@
|
||||
(:name "Errands"
|
||||
:tag ("errand" "call")
|
||||
:order 10)
|
||||
(:name "Thesis"
|
||||
:tag "thesis"
|
||||
(:name "Projects"
|
||||
:file-path "Projects"
|
||||
:order 6)
|
||||
(:discard (:tag ("periodic" "birthday")))))
|
||||
:config
|
||||
@@ -92,10 +95,6 @@
|
||||
(use-package! engrave-faces-latex
|
||||
:after ox-latex)
|
||||
(setq org-latex-src-block-backend 'engraved)
|
||||
;; Set up bibliography management
|
||||
(setq org-cite-global-bibliography '("~/Documents/Uni/Thesis/docs/bibliography.bib")
|
||||
citar-bibliography org-cite-global-bibliography
|
||||
citar-library-paths '("~/Documents/Uni/Thesis/bibliography"))
|
||||
;; Add citeproc and metadata-file options to ox-pandoc
|
||||
(after! ox-pandoc
|
||||
(add-to-list 'org-pandoc-valid-options 'citeproc)
|
||||
@@ -117,17 +116,6 @@
|
||||
:file "~/Notes/Recipes.org"
|
||||
:type entry
|
||||
:template ("%(org-chef-get-recipe-from-url)"))
|
||||
("Reference" :keys "r"
|
||||
:type entry
|
||||
:file "~/Documents/Uni/Thesis/docs/Bibliography.org"
|
||||
:function org-goto
|
||||
:fetch-bibtex (lambda () (org-capture-ref-process-capture))
|
||||
:org-entry (lambda () (org-capture-ref-get-org-entry))
|
||||
:template
|
||||
("%{fetch-bibtex}* %?%{space}%(org-capture-ref-get-bibtex-field :title)"
|
||||
"#+begin_src bibtex"
|
||||
"%(org-capture-ref-get-bibtex-field :bibtex-string)"
|
||||
"#+end_src")))))
|
||||
;; Fix org-chef scraping
|
||||
(setq org-chef-prefer-json-ld t)
|
||||
;; Get the current state of org-pomodoro
|
||||
@@ -182,10 +170,6 @@
|
||||
(add-hook! 'org-mode-hook 'org-fragtog-mode)
|
||||
;; Auto tangle on save
|
||||
(add-hook! 'org-mode-hook 'org-auto-tangle-mode)
|
||||
;; Save bibtex to annotated bibliography with category selection
|
||||
(setq org-goto-interface 'outline-path-completion
|
||||
org-goto-max-level 1)
|
||||
(use-package! org-capture-ref)
|
||||
;; HACK Fix search folded sections
|
||||
(setq org-fold-core-style 'overlays)
|
||||
(evil-select-search-module 'evil-search-module 'evil-search)
|
||||
|
||||
35
+rss.el
Normal file
35
+rss.el
Normal file
@@ -0,0 +1,35 @@
|
||||
;;; +rss.el -*- lexical-binding: t; -*-
|
||||
;; Elfeed configuration
|
||||
;;
|
||||
;; Tweak appeareance of the main page
|
||||
(setq elfeed-sort-order 'ascending
|
||||
elfeed-search-filter "@all +unread"
|
||||
elfeed-goodies/tag-column-width 0)
|
||||
;; Synchronize elfeed with Miniflux
|
||||
(use-package! elfeed-protocol
|
||||
:after elfeed
|
||||
:config
|
||||
(setq elfeed-use-curl t
|
||||
elfeed-protocol-enabled-protocols '(fever)
|
||||
elfeed-protocol-feeds (list
|
||||
(list "fever+https://coolneng@rss.psydnd.org"
|
||||
:api-url "https://rss.psydnd.org/fever/"
|
||||
:password (auth-source-pass-get 'secret "api/miniflux"))))
|
||||
(elfeed-protocol-enable))
|
||||
;; Update RSS feeds on startup
|
||||
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
||||
;; Use different font and show article in fullscreen
|
||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||
:override #'+rss-elfeed-wrap-h
|
||||
(setq-local truncate-lines nil
|
||||
shr-width 160
|
||||
visual-fill-column-center-text t
|
||||
default-text-properties '(line-height 1.1))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(visual-fill-column-mode)
|
||||
(setq-local shr-current-font '(:family "Lato" :height 1.1))
|
||||
(set-buffer-modified-p nil)))
|
||||
11
+ui.el
11
+ui.el
@@ -6,10 +6,11 @@
|
||||
;; Display Magit status in fullscreen
|
||||
(after! magit
|
||||
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1))
|
||||
;; Match pdf-tools colors to the theme and fit to page by default
|
||||
;; Match pdf-tools colors to the theme, fit to page by default and enable smooth scrolling
|
||||
(after! pdf-tools
|
||||
(setq pdf-view-midnight-colors '("#BBC2CF" . "#282C34"))
|
||||
(add-hook 'pdf-tools-enabled-hook 'pdf-view-midnight-minor-mode))
|
||||
(setq-default pdf-view-display-size 'fit-width)
|
||||
(add-hook 'pdf-tools-enabled-hook 'pdf-view-roll-minor-mode))
|
||||
;; Customize modeline
|
||||
(setq doom-modeline-major-mode-icon t
|
||||
doom-modeline-buffer-encoding nil)
|
||||
@@ -62,11 +63,7 @@
|
||||
:icon (nerd-icons-octicon "nf-oct-rss" :face 'doom-dashboard-menu-title)
|
||||
:when (featurep! :app rss)
|
||||
:face (:inherit (doom-dashboard-menu-title bold))
|
||||
:action =rss)
|
||||
("Read saved articles"
|
||||
:icon (nerd-icons-octicon "nf-oct-book" :face 'doom-dashboard-menu-title)
|
||||
:face (:inherit (doom-dashboard-menu-title bold))
|
||||
:action =wallabag)))
|
||||
:action =rss)))
|
||||
;; Restore previous session without confirmation
|
||||
(defadvice! restore-no-confirm-session-quickload-a ()
|
||||
:override #'doom/quickload-session
|
||||
|
||||
78
config.el
78
config.el
@@ -8,18 +8,13 @@
|
||||
(load! "+keybindings")
|
||||
;; Set projects directories
|
||||
(setq projectile-project-search-path '(("~/Projects" . 2)
|
||||
("~/Documents/Work" . 1)
|
||||
("~/Documents/Papers" . 0)
|
||||
("~/Documents/Typesetting" . 1)
|
||||
("~/Documents/Paperwork" . 1)
|
||||
("~/Documents/Typesetting" . 1)
|
||||
("~/Documents/Uni" . 3)
|
||||
("~/Repos" . 1)
|
||||
("~/Documents" . 5)
|
||||
("~/Repos")
|
||||
"~/.dotfiles"
|
||||
"~/Notes"))
|
||||
; Auto cleanup recentf
|
||||
;; Auto cleanup recentf
|
||||
(setq recentf-auto-cleanup 300)
|
||||
; Save backup files to ~/.cache and autosave files to ~/.cache/emacs
|
||||
;; Save backup files to ~/.cache and autosave files to ~/.cache/emacs
|
||||
(setq backup-directory-alist `(("." . "~/.cache"))
|
||||
auto-save-list-file-prefix (concat "~/.cache"))
|
||||
;; Load org configuration
|
||||
@@ -86,63 +81,8 @@
|
||||
(after! lsp-clangd (set-lsp-priority! 'clangd 2))
|
||||
;; Use relative line numbers (Usage: number <j/k>)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
;; Use pass as auth-source
|
||||
(add-to-list 'auth-sources 'password-store)
|
||||
;; Set up wallabag
|
||||
(after! wallabag
|
||||
(setq wallabag-host "https://wallabag.coolneng.duckdns.org"
|
||||
wallabag-username "coolneng"
|
||||
wallabag-password (auth-source-pass-get 'secret "api/wallabag")
|
||||
wallabag-clientid (auth-source-pass-get "clientid" "api/wallabag")
|
||||
wallabag-secret (auth-source-pass-get "api-secret" "api/wallabag")
|
||||
wallabag-show-sidebar 't
|
||||
wallabag-show-entry-switch 'switch-to-buffer
|
||||
url-automatic-caching t)
|
||||
(add-hook! 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter))
|
||||
(add-hook! 'doom-real-buffer-functions
|
||||
(defun +rss-buffer-p (buf)
|
||||
(string-match-p "^\\*wallabag" (buffer-name buf))))
|
||||
(defvar +wallabag-workspace-name "*wallabag*")
|
||||
(defun =wallabag ()
|
||||
"Activate (or switch to) `wallabag' in its workspace."
|
||||
(interactive)
|
||||
(if (modulep! :ui workspaces)
|
||||
(progn
|
||||
(+workspace-switch +wallabag-workspace-name t)
|
||||
(doom/switch-to-scratch-buffer)
|
||||
(wallabag)
|
||||
(+workspace/display))
|
||||
(setq +wallabag--wconf (current-window-configuration))
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer (doom-fallback-buffer))
|
||||
(wallabag)))
|
||||
;; Set up elfeed
|
||||
(after! elfeed
|
||||
(setq elfeed-use-curl t)
|
||||
(setq elfeed-protocol-feeds (list
|
||||
(list "fever+https://coolneng@rss.coolneng.duckdns.org"
|
||||
:api-url "https://rss.coolneng.duckdns.org/fever/"
|
||||
:password (auth-source-pass-get 'secret "api/miniflux"))))
|
||||
(setq elfeed-sort-order 'ascending
|
||||
elfeed-search-filter "@all +unread"
|
||||
elfeed-goodies/tag-column-width 0)
|
||||
(elfeed-protocol-enable)
|
||||
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
||||
;; Use different font and show article in fullscreen
|
||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||
:override #'+rss-elfeed-wrap-h
|
||||
(setq-local truncate-lines nil
|
||||
shr-width 160
|
||||
visual-fill-column-center-text t
|
||||
default-text-properties '(line-height 1.1))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(visual-fill-column-mode)
|
||||
(setq-local shr-current-font '(:family "Lato" :height 1.1))
|
||||
(set-buffer-modified-p nil))))
|
||||
;; Set up RSS reader
|
||||
(after! elfeed (load! "+rss"))
|
||||
;; Set up the mail stack
|
||||
(after! mu4e (load! "+mail"))
|
||||
;; HACK Enable AOT native compilation
|
||||
@@ -154,9 +94,6 @@
|
||||
:after cc-mode
|
||||
:config
|
||||
(add-hook! 'c++-mode-hook (platformio-conditionally-enable)))
|
||||
;; Disable Pyright's type checking
|
||||
(after! lsp-pyright
|
||||
(setq lsp-pyright-use-library-code-for-types nil))
|
||||
;; Set indentation level to 2
|
||||
(setq tab-width 2)
|
||||
;; Move buffer while maintaining cursor centered
|
||||
@@ -167,3 +104,6 @@
|
||||
(pixel-scroll-precision-mode)
|
||||
;; Restore previous session on startup
|
||||
(add-hook 'window-setup-hook #'doom/quickload-session)
|
||||
;; Set ruff as the default python formatter
|
||||
(after! python
|
||||
(set-formatter! 'ruff :modes '(python-mode python-ts-mode)))
|
||||
|
||||
9
init.el
9
init.el
@@ -11,7 +11,7 @@
|
||||
(doom! :input
|
||||
;;chinese
|
||||
;;japanese
|
||||
;layout ; auie,ctsrnm is the superior home row
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
;;(company +tng) ; the ultimate code completion backend
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
biblio ; Writes a PhD for you (citation needed)
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
debugger ; FIXME stepping through code, to help you add bugs
|
||||
direnv
|
||||
;;docker
|
||||
@@ -94,7 +94,7 @@
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
;;+docsets) ; ...or in Dash docsets locally
|
||||
lsp ; M-x vscode
|
||||
(lsp +booster) ; M-x vscode
|
||||
;;macos ; MacOS-specific commands
|
||||
magit ; a git porcelain for Emacs
|
||||
make ; run make tasks from Emacs
|
||||
@@ -105,7 +105,7 @@
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
upload ; map local to remote projects via ssh/ftp
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
@@ -164,7 +164,6 @@
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
(python +lsp ; beautiful is better than ugly
|
||||
+pyright
|
||||
+poetry
|
||||
+tree-sitter)
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
|
||||
13
packages.el
13
packages.el
@@ -9,8 +9,6 @@
|
||||
(package! org-super-agenda)
|
||||
;; Save recipes to org file
|
||||
(package! org-chef)
|
||||
;; Wallabag client
|
||||
(package! wallabag :recipe (:host github :repo "chenyanming/wallabag.el" :files ("*.el" "*.alist" "*.css")))
|
||||
;; Miniflux integration for elfeed
|
||||
(package! elfeed-protocol)
|
||||
;; Prettier LaTeX source blocks
|
||||
@@ -21,14 +19,15 @@
|
||||
(package! org-auto-tangle)
|
||||
;; Enable LaTeX previews automatically
|
||||
(package! org-fragtog)
|
||||
;; Fetch and save bibtex from Firefox
|
||||
(package! asoc :recipe (:host github :repo "troyp/asoc.el"))
|
||||
(package! doct :recipe (:host github :repo "progfolio/doct"))
|
||||
(package! persid :recipe (:host github :repo "rougier/persid"))
|
||||
(package! org-capture-ref :recipe (:host github :repo "yantar92/org-capture-ref"))
|
||||
;; Arduino development
|
||||
(package! platformio-mode)
|
||||
;; Light theme
|
||||
(package! os1-theme :recipe (:host github :repo "sashimacs/os1-theme"))
|
||||
;; Move buffer while maintaining cursor centered
|
||||
(package! centered-cursor-mode)
|
||||
;; Use the fork of pdf-tools with smooth scrolling
|
||||
(unpin! pdf-tools)
|
||||
(package! pdf-tools :recipe (:host github :repo "aikrahguzar/pdf-tools" :branch "child-frame-preview"))
|
||||
(package! image-roll :recipe (:host github :repo "dalanicolai/image-roll.el"))
|
||||
;; Declarative org capture templates
|
||||
(package! doct :recipe (:host github :repo "progfolio/doct"))
|
||||
|
||||
12
snippets/org-msg-edit-mode/work administration
Normal file
12
snippets/org-msg-edit-mode/work administration
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: work administration template
|
||||
# key: work
|
||||
# condition: t
|
||||
# --
|
||||
Dear colleague,
|
||||
|
||||
You will find attached to this mail my $1 for the month of `(format-time-string "%B %Y")`.
|
||||
|
||||
Kind regards,
|
||||
|
||||
Amin Kasrou Aouam
|
||||
Reference in New Issue
Block a user