27 Commits

Author SHA1 Message Date
08f7a1a9ee feat: add WireGuard Waybar custom module
- Added scripts/wireguard-status.sh — JSON output with lock/unlock icons,
  human-readable TX/RX stats, tooltip with peer/endpoint/IP details
- Added custom/wireguard module to Waybar modules.json (10s interval, JSON
  return type, click left/right for up/down)
- Added custom/wireguard to modules-right bar config
- Added CSS for #custom-wireguard (connected/disconnected classes)
- Added openresolv install and Waybar refresh instructions to README.org
2026-05-20 14:33:28 -04:00
7fd549fe00 feat: add WireGuard VPN keybinds (Super+Ctrl+V connect, Super+Ctrl+Shift+V disconnect) 2026-05-20 14:30:42 -04:00
7b1998a40d Merge pull request 'fix: replace deprecated hyprland dwindle options (pseudotile, togglesplit)' (#7) from fix/hyprland-deprecated-options into master
Reviewed-on: #7
2026-05-15 15:24:55 +00:00
9b4c678fd9 Merge branch 'master' into fix/hyprland-deprecated-options 2026-05-15 11:23:35 -04:00
53b376e6e3 fix: replace deprecated dwindle pseudotile and togglesplit options
- pseudotile variable removed from dwindle block in Hyprland 0.55+
- togglesplit standalone dispatcher removed, use pseudo dispatcher instead (matches original intent)
- Skill updated with absolute paths for common edit locations
2026-05-15 11:18:15 -04:00
6f6b24d3c3 Merge pull request 'fix: add local stow package to Makefile CONFIG_DIRS' (#5) from fix/add-local-stow into master
Reviewed-on: #5
2026-05-14 22:16:42 +00:00
7a0948a43f fix: add local stow package to Makefile 2026-05-14 18:16:08 -04:00
addf9fbe83 Merge pull request 'feat: add QET Xephyr launch script for Wayland drag-drop workaround' (#4) from feat/qet-xephyr-launch into master
Reviewed-on: #4
2026-05-14 22:14:23 +00:00
fb1d0cd2d9 fix: restore .desktop file for QET Xephyr 2026-05-14 17:38:46 -04:00
5f465ecb5a Revert "feat: add .desktop file for QET Xephyr wofi launch"
This reverts commit 8f5d2e73bc.
2026-05-14 17:38:23 -04:00
48038df872 Merge remote-tracking branch 'origin/feat/qet-xephyr-launch' into feat/qet-xephyr-launch 2026-05-14 17:38:13 -04:00
d5095064c2 feat: add wofi .desktop file for QET Xephyr launch 2026-05-14 17:37:51 -04:00
8f5d2e73bc feat: add .desktop file for QET Xephyr wofi launch 2026-05-14 17:23:55 -04:00
69c2447f04 Merge pull request 'feat: Add Hermes Agent vterm integration with SPC z h keybinding' (#1) from feat/hermes-vterm-integration into master
Reviewed-on: #1
2026-05-14 21:19:55 +00:00
4982831883 Command to send stuff to hermes 2026-05-14 17:12:10 -04:00
311a2eae57 Emacs config with the hermes shortcut 2026-05-14 17:11:08 -04:00
79ce045657 feat: add QET Xephyr launch script 2026-05-14 16:51:04 -04:00
Thierry Pouplier
386d1a3bf8 fix: add ssh -t to zsh alias, use vterm-mode instead of vterm in Emacs function
- zsh alias: added -t to SSH (docker exec -it needs a TTY)
- Emacs function: vterm-mode instead of vterm (vterm splits windows,
  vterm-mode is just a major mode, keeps current window layout)
- The SSH command in both cases is now consistent:
  ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'
2026-05-01 15:06:05 +00:00
Thierry Pouplier
a09a7c03ef fix: update zsh alias to direct SSH, fix Emacs function with delete-other-windows and correct docker exec path
- Zsh alias now runs ssh + docker exec directly (no emacsclient)
- Emacs function uses delete-other-windows for clean single-window vterm
- SSH command uses correct docker exec path: /opt/hermes/.venv/bin/hermes
- config.el not included - user will tangle from README.org
2026-05-01 15:02:19 +00:00
Thierry Pouplier
d73ed29733 fix: move hermes config from config.el to README.org org-babel source
- Revert config.el changes (file is generated from README.org via tangle)
- Add dedicated ** +Hermes Agent+ section under * AI in README.org
- Add SPC z h keybinding to existing map! block in Minimize window section
- config.el should NEVER be edited directly
2026-05-01 14:50:36 +00:00
Thierry Pouplier
a2a3baf7da feat: add hermes zsh alias (hermes) and Hyprland binding ( + C)
- zsh: alias hermes=emacsclient -n -c -e '(gortium/hermes-vterm)'
- hyprland: bind = , C to same command
- C for CLI/Chat, unused key in current layout
2026-05-01 14:40:02 +00:00
Thierry Pouplier
aa06568852 refactor: replace sleep-for vterm hack with process-send-string for Hermes launch
- Replaced sleep-for 0.5 + vterm-send-string timing hack with
  direct process-send-string (no timing race)
- Removed TUI chat command, SSH uses -t PTY for clean CLI mode
- Lines 947-957 in config.el
2026-05-01 14:35:48 +00:00
Thierry Pouplier
390ba2ef61 feat: Add Hermes Agent vterm integration with SPC z h keybinding 2026-04-30 14:35:33 +00:00
5ee760fbe8 Doom emacs config progress dump 2026-04-30 10:25:25 -04:00
c1fbe2e8d9 Script path fix 2026-04-30 10:25:10 -04:00
1a4cafa098 Added perso mail secret 2026-04-30 10:24:39 -04:00
7e48bf1b87 rclone fix 2026-04-30 10:22:28 -04:00
15 changed files with 910 additions and 254 deletions

View File

@@ -1,5 +1,5 @@
# Define list of directories you want to stow
CONFIG_DIRS := btop doom hypr kitty nvim rclone starship tmux wallpapers waybar wireplumber wofi yazi zsh
CONFIG_DIRS := btop doom hypr kitty local nvim rclone starship tmux wallpapers waybar wireplumber wofi yazi zsh
all: stow_all
wal -i ~/.config/wallpapers/green_yellow_forest.jpg -o ~/.config/waybar/launch.sh

View File

@@ -17,6 +17,42 @@ I use stow to deploy all this to where it need to go (mostly ~/.confg).
** starship
** tmux
** waybar
*** WireGuard Module
The Waybar includes a custom WireGuard VPN status module that shows connection status, TX/RX stats, and peer info.
Setup:
1. Install openresolv (needed by wg-quick for DNS):
#+begin_src bash :tangle no
sudo pacman -S openresolv
#+end_src
2. Configure sudo for wg-quick (required for click-to-toggle binds):
#+begin_src bash :tangle no
echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/wg-quick" | sudo tee /etc/sudoers.d/wireguard
#+end_src
3. Create a WireGuard config (if not exists):
#+begin_src bash :tangle no
sudo cp /etc/wireguard/work-laptop.conf /etc/wireguard/
sudo chmod 600 /etc/wireguard/work-laptop.conf
#+end_src
4. Refresh Waybar to pick up new config:
#+begin_src bash :tangle no
killall -q waybar && waybar -c ~/.config/waybar/config.jsonc & -s ~/.config/waybar/style.css &
#+end_src
Or use the launch script:
#+begin_src bash :tangle no
~/.config/waybar/launch.sh
#+end_src
Keybinds:
- ~$mainMod+Ctrl+V~ — Connect WireGuard (work-laptop)
- ~$mainMod+Ctrl+Shift+V~ — Disconnect WireGuard
The module polls /usr/bin/wg every 10 seconds. It shows a lock icon with TX/RX when connected, or an unlock icon when disconnected.
** Wireplumber
** wofi
** yazi

View File

@@ -112,7 +112,9 @@ My current workflow consist in having the 3-5 files I work on open in vertical s
#+begin_src emacs-lisp
(map! :leader
(:prefix ("w" . "window")
:desc "Minimize window" "O" #'minimize-window))
:desc "Minimize window" "O" #'minimize-window)
(:prefix ("z" . "Personal")
:desc "Hermes Agent" "h" #'gortium/hermes-vterm))
#+end_src
** Ultra-scroll
@@ -156,7 +158,6 @@ My current workflow consist in having the 3-5 files I work on open in vertical s
#+end_src
* Org Mode
If you use ~org~ and don't want your org files in the default location below,
change ~org-directory~. It must be set before org loads!
@@ -164,12 +165,11 @@ change ~org-directory~. It must be set before org loads!
#+begin_src emacs-lisp
(setq
org-directory "~/ExoKortex/"
+org-capture-todo-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-notes-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-journal-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-emails-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-todo-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-notes-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-journal-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-emails-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
;; +org-capture-central-project-todo-file '"refile.org"
;; +org-capture-project-todo-file '"refile.org"
org-agenda-files (directory-files-recursively "~/ExoKortex/" "\\.org$")
@@ -366,15 +366,34 @@ change ~org-directory~. It must be set before org loads!
("p" . "Personal commands")
("wg" "GTD view"
(
(agenda "" ((org-agenda-span 'week)))
(todo "STRT" ((org-agenda-overriding-header gtd/started-head)))
(todo "NEXT" ((org-agenda-overriding-header gtd/next-action-head)))
(todo "WAIT" ((org-agenda-overriding-header gtd/waiting-head)))
(agenda "" ((org-agenda-span 'week)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "STRT" ((org-agenda-overriding-header gtd/started-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "NEXT" ((org-agenda-overriding-header gtd/next-action-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "WAIT" ((org-agenda-overriding-header gtd/waiting-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
;; (todo "DONE" ((org-agenda-overriding-header gtd/complete-head)))
(stuck "" ((org-stuck-projects '("TODO=\"PROJ\"" ("NEXT" "STRT") nil ""))
(org-agenda-overriding-header gtd/project-head)))
(todo "IDEA" ((org-agenda-overriding-header gtd/someday-head)))
(org-agenda-overriding-header gtd/project-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "IDEA" ((org-agenda-overriding-header gtd/someday-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
)
((org-agenda-tag-filter-preset '("+work")))
)
("pg" "GTD view"
@@ -476,10 +495,10 @@ change ~org-directory~. It must be set before org loads!
)))
((org-agenda-tag-filter-preset '("+BA_ON_SITE")))
)
)
)
)
)
#+end_src
** Rust
@@ -492,20 +511,64 @@ change ~org-directory~. It must be set before org loads!
#+end_src
** Latex
#+begin_src emacs-lisp
(after! org
(setq
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
;; LaTeX math preview
org-format-latex-options '(:foreground default :background default :scale 2 :html-foreground "Black"
:html-background "Transparent" :html-scale 1.0
:matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
)
;; 1. Use XeLaTeX to generate the intermediate file for dvisvgm
;; This handles UTF-8 (like long dashes) which standard 'latex' crashes on.
(setq org-preview-latex-process-alist
'((dvisvgm
:programs ("xelatex" "dvisvgm")
:description "xdv to svg"
:message "rendering %f via xelatex..."
:image-input-type "xdv"
:image-output-type "svg"
:image-size-adjust (1.0 . 1.0)
:latex-compiler ("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f")
:image-converter ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))))
(setq org-preview-latex-default-process 'dvisvgm)
(defun gortium/org-latex-preview-all ()
"Render all LaTeX fragments in the buffer."
(interactive)
(when (derived-mode-p 'org-mode)
(org-latex-preview '(16))))
;; 1.5s delay to ensure Doom font-colors load first
;; (add-hook 'org-mode-hook
;; (lambda ()
;; (run-with-idle-timer 1.5 nil #'gortium/org-latex-preview-all)))
)
(after! ox-latex
(setq org-latex-compiler "xelatex"))
(setq org-latex-src-block-backend 'listings)
(add-to-list 'org-latex-packages-alist '("" "listings") t)
(add-to-list 'org-latex-packages-alist '("" "xcolor") t)
(add-to-list 'org-latex-listings-langs '(text ""))
(setq org-latex-listings-options
'(("breaklines" "true")
("basicstyle" "\\small\\ttfamily")
("frame" "single")
("backgroundcolor" "\\color{gray!10}"))))
#+end_src
** Fragtog
#+begin_src emacs-lisp
(use-package! org-fragtog
:hook (org-mode . org-fragtog-mode))
(defun gortium/org-latex-refresh-on-zoom (&rest _)
(when (derived-mode-p 'org-mode)
(let ((new-scale (+ 2 (* 0.5 (if (boundp 'text-scale-mode-amount) text-scale-mode-amount 0)))))
(setq org-format-latex-options
(plist-put org-format-latex-options :scale new-scale))
(org-clear-latex-preview)
(gortium/org-latex-preview-all))))
(advice-add 'text-scale-increase :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-decrease :after #'gortium/org-latex-refresh-on-zoom)
#+end_src
** Org Capture
@@ -555,6 +618,7 @@ org-modern instead
#+end_src
* Markdown
#+begin_src emacs-lisp
(after! grip-mode
(setq grip-binary-path "/home/tpouplier/.local/bin/grip")
@@ -599,6 +663,7 @@ org-modern instead
#+end_src
* PlantUML
#+begin_src emacs-lisp
;; Enable plantuml-mode for PlantUML files
(add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
@@ -623,6 +688,7 @@ fc --> UC3
[[/tmp/babel-pg1Nry/plantuml-SHtP1g.png][/tmp/babel-pg1Nry/plantuml-SHtP1g.png]]
* Elgantt
Broken for now..
#+begin_src emacs-lisp :tangle no
(require 'cl-lib)
@@ -842,12 +908,11 @@ Broken for now..
: elgantt-open-current-org-file
* Org Roam
** Static Path
#+begin_src emacs-lisp
(setq org-roam-directory (file-truename "~/ExoKortex/")
org-roam-db-location (file-truename "~/ExoKortex/2-Areas/IT/Roam/org-roam.db")
org-roam-db-location (file-truename "~/ExoKortex/1-Soma/2-Areas/IT/Roam/org-roam.db")
org-attach-id-dir "assets/"
org-roam-dailies-directory "~/ExoKortex/2-Areas/Meta-Planning/Org/Journal/Daily")
#+end_src
@@ -1056,7 +1121,6 @@ Handles org-clock and context link capture for tasks."
#+end_src
* IDE
** Dap Mode
#+begin_src emacs-lisp
@@ -1179,14 +1243,14 @@ Now I can write x) (spellchecking)
(after! ispell
(setq ispell-program-name "hunspell"
ispell-dictionary "en_CA,fr_CA"
ispell-personal-dictionary "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/perso.dic")
ispell-personal-dictionary "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/perso.dic")
;; Set the dictionary path environment variable
(setenv "DICPATH" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries")
(setenv "DICPATH" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries")
(setq ispell-hunspell-dict-paths-alist
'(("fr_CA" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/fr_CA.aff")
("en_CA" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/en_CA.aff")))
'(("fr_CA" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/fr_CA.aff")
("en_CA" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/en_CA.aff")))
(setq ispell-hunspell-dictionary-alist
'(("fr_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "fr_CA") nil utf-8)
@@ -1348,33 +1412,6 @@ I'm a formatting nazi now xD
)
#+end_src
** Fragtog
#+begin_src emacs-lisp
;; Hook fragtog to org-mode to have editable latex preview
(use-package! org-fragtog
:hook (org-mode . org-fragtog-mode))
;; Rescale latex preview when changing font size
(defun gortium/org-latex-refresh-on-zoom (&rest _)
"Dynamically rescale and refresh all LaTeX previews after text zoom."
(when (derived-mode-p 'org-mode)
;; Dynamically update scale relative to zoom level
(setq org-format-latex-options
(plist-put org-format-latex-options
:scale (+ 2 (* 0.5 text-scale-mode-amount))
))
;; Clear all previews
(org-clear-latex-preview)
;; Re-render all previews
(org-latex-preview '(16))
))
(advice-add 'text-scale-increase :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-decrease :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-set :after #'gortium/org-latex-refresh-on-zoom)
#+end_src
** Age
Allow me to edit encryted age file directly in emacs buffer.
@@ -1449,11 +1486,11 @@ Allow retrieval of password from age file formatted like passwordstore
;; rebind function value for pass to passage
(fset #'pass (lambda () (interactive) (passage)))
(setq age-program "rage")
(setq auth-source-passage-filename (expand-file-name "~/ExoKortex/2-Areas/IT/dotfiles/secrets"))
(setq auth-source-passage-filename (expand-file-name "~/ExoKortex/4-Automata/dotfiles/secrets"))
(setenv "PASSAGE_IDENTITIES_FILE" (expand-file-name age-default-identity))
(setenv "PASSAGE_RECIPIENTS_FILE" (expand-file-name age-default-recipient))
(setenv "PASSAGE_AGE" "rage")
(setenv "PASSAGE_DIR" (expand-file-name "~/ExoKortex/2-Areas/IT/dotfiles/secrets"))
(setenv "PASSAGE_DIR" (expand-file-name "~/ExoKortex/4-Automata/dotfiles/secrets"))
)
#+end_src
** Diff HL Mode
@@ -1464,7 +1501,6 @@ Show git changes in the sidebar
#+end_src
* Terminal
** +EEE+
#+begin_src emacs-lisp :tangle no
@@ -1519,7 +1555,8 @@ The best LLM integration I found. Works with MCP server for more functionnalitie
deepseek/deepseek-chat-v3-0324:free
meta-llama/llama-4-maverick:free
mistralai/devstral-2512:free
qwen/qwen3-coder:free))
qwen/qwen3-coder:free
nvidia/nemotron-3-nano-30b-a3b:free))
(gptel-make-gemini "Gemini"
:key (auth-source-passage-get 'secret "gemini")
:stream t
@@ -1795,6 +1832,25 @@ Org-AI
(org-ai-install-yasnippets)) ; if you are using yasnippet and want `ai` snippets
#+end_src
** +Hermes Agent+
Hermes Agent runs on lazyworkhorse server. Launched via SSH in a vterm buffer.
#+begin_src emacs-lisp
(after! vterm
(defun gortium/hermes-vterm ()
"Launch Hermes Agent in vterm via SSH to lazyworkhorse (CLI mode)."
(interactive)
(let ((buf (get-buffer-create "*hermes*")))
(switch-to-buffer buf)
(unless (and (eq major-mode 'vterm-mode)
(get-buffer-process buf))
(vterm-mode)
(let ((proc (get-buffer-process buf)))
(when proc
(process-send-string
proc "ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'\n")))))))
#+end_src
* Tramp
Remote connection to server inside emacs (with all my config) <3
@@ -1961,7 +2017,6 @@ Useful for the user, but also when you have someone over your shoulder trying to
#+end_src
* Email
** Org-Msg
#+begin_src emacs-lisp
@@ -1971,14 +2026,54 @@ Useful for the user, but also when you have someone over your shoulder trying to
(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
org-msg-startup "hidestars indent inlineimages"
org-msg-greeting-fmt "\nBonjour%s,\n\n"
;; org-msg-recipient-names '(("jeremy.compostella@gmail.com" . "Jérémy"))
org-msg-greeting-name-limit 1
org-msg-default-alternatives '((new . (text html))
(reply-to-html . (text html))
(reply-to-text . (text)))
org-msg-convert-citation t
org-msg-signature "
org-msg-convert-citation t)
)
#+end_src
** Mu4e
#+begin_src emacs-lisp
(after! mu4e
(setq mu4e-maildir-shortcuts mu4e-maildir-list mu4e-maildir-initial-input mu4e-maildir-info-delimiter)
(setq mu4e-contexts
(list
;; --- CONTEXT: TDNDE ---
(make-mu4e-context
:name "TDNDE"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/TDNDE/" (mu4e-message-field msg :maildir))))
:vars
'((user-mail-address . "tpouplier@tdnde.com")
(user-full-name . "Thierry Pouplier")
;; Folders
(mu4e-sent-folder . "/TDNDE/Sent")
(mu4e-drafts-folder . "/TDNDE/Drafts")
(mu4e-trash-folder . "/TDNDE/Trash")
(mu4e-refile-folder . "/TDNDE/Archive")
;; Shortcuts
(mu4e-maildir-shortcuts . (("/TDNDE/Inbox" . ?i)
("/TDNDE/Sent" . ?s)
("/TDNDE/Drafts" . ?d)
("/TDNDE/Trash" . ?t)
("/TDNDE/Archive" . ?a)))
;; SMTP
(smtpmail-smtp-user . "tpouplier@tdnde.com")
(smtpmail-stream-type . ssl)
(smtpmail-smtp-server . "smtp.hostinger.com")
(smtpmail-smtp-service . 465)
(mu4e-sent-messages-behavior . sent)
;; Context-specific signature
(org-msg-signature . "
Cdlt,
,#+begin_signature
@@ -1992,97 +2087,66 @@ Tél. : +1 (450) 667-1884 \\\\
Cell. : +1 (514) 887-1674 \\\\
tpouplier@tdnde.com \\\\
www.tdnde.com \\\\
,#+end_signature")
)
#+end_src
,#+end_signature")))
** Mu4e
#+begin_src emacs-lisp
(after! mu4e
(setq mu4e-maildir-shortcuts mu4e-maildir-list mu4e-maildir-initial-input mu4e-maildir-info-delimiter)
(setq mu4e-contexts
(list
;; --- CONTEXT: Perso ---
(make-mu4e-context
:name "TDNDE"
:match-func
(lambda (msg)
(when msg
(string-prefix-p
"/TDNDE/"
(mu4e-message-field msg :maildir))))
:vars
'((user-mail-address . "tpouplier@tdnde.com")
(user-full-name . "Thierry Pouplier")
:name "Perso"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/Perso/" (mu4e-message-field msg :maildir))))
:vars `((user-mail-address . "thierrypouplier@gmail.com")
(user-full-name . "Thierry Pouplier")
(mu4e-sent-folder . "/Perso/Sent")
(mu4e-drafts-folder . "/Perso/Drafts")
(mu4e-trash-folder . "/Perso/Trash")
(mu4e-refile-folder . "/Perso/Archive")
(mu4e-maildir-shortcuts . (("/Perso/Inbox" . ?i)
("/Perso/Sent" . ?s)
("/Perso/Trash" . ?t)
("/Perso/Drafts" . ?d)
("/Perso/Archive" . ?a)))
(smtpmail-smtp-user . "thierrypouplier@gmail.com")
(smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-service . 587)
(smtpmail-stream-type . starttls)
(mu4e-sent-messages-behavior . sent)
(org-msg-signature . "
Cordialement,
;; Folders
(mu4e-sent-folder . "/TDNDE/Sent")
(mu4e-drafts-folder . "/TDNDE/Drafts")
(mu4e-trash-folder . "/TDNDE/Trash")
(mu4e-refile-folder . "/TDNDE/Archive")
;; Shortcuts
(mu4e-maildir-shortcuts
.
(("/TDNDE/Inbox" . ?i)
("/TDNDE/Sent" . ?s)
("/TDNDE/Drafts" . ?d)
("/TDNDE/Trash" . ?t)
("/TDNDE/Archive" . ?a)))
;; Bookmarks
(mu4e-bookmarks
.
((:name "Airbus-6825"
:query "maildir:/TDNDE/* AND label:proj:6825 AND label:client:airbus"
:key ?A)
(:name "Bombardier-3154"
:query "maildir:/TDNDE/* AND label:proj:3154 AND label:client:bombardier"
:key ?B)
(:name "Daher-5304"
:query "maildir:/TDNDE/* AND label:proj:5304 AND label:client:daher"
:key ?D)
(:name "TDNDE"
:query "maildir:/TDNDE/* AND label:tdnde"
:key ?T)))
;; SMTP
(smtpmail-smtp-user . "tpouplier@tdnde.com")
(smtpmail-stream-type . ssl)
(smtpmail-smtp-server . "smtp.hostinger.com")
(smtpmail-smtp-service . 465)))
;; Other context here
;; (make-mu4e-context ...)
)
)
,#+begin_signature
--
,*Thierry Pouplier* \\
(514) 887-1674 | thierrypouplier@gmail.com
,#+end_signature"))))) ;; End of mu4e-contexts list
(setq mu4e-context-policy 'pick-first
mu4e-compose-context-policy 'ask)
(require 'mu4e-icalendar)
(mu4e-icalendar-setup)
(setq mu4e-icalendar-diary-file nil)
(setq gnus-icalendar-org-capture-file +org-capture-journal-file
gnus-icalendar-org-capture-headline '("Journal"))
(gnus-icalendar-org-setup)
)
;; Separate after! blocks for clarity
(after! mu4e
(setq mu4e-modeline-support nil))
(after! mu4e
;; restore label key
(evil-define-key 'normal mu4e-headers-mode-map"l" #'mu4e-headers-mark-for-label)
(evil-define-key 'normal mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'visual mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'emacs mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'normal mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
(evil-define-key 'visual mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
(evil-define-key 'emacs mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
)
(evil-define-key 'emacs mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)))
#+end_src
* IRC
@@ -2248,7 +2312,7 @@ If FILE is nil, refile in the current file."
(add-hook 'ediff-prepare-buffer-hook 'org-ediff-prepare-buffer)
#+end_src
* Custom function for reschedulling
* Custom function for scheduling
#+begin_src emacs-lisp
;;; ============================================================
@@ -2697,6 +2761,143 @@ and ensure the standard property drawer exists without overwriting existing data
#+RESULTS:
: gortium/add-ids-to-subtree
* Custom function for maintenance
#+begin_src emacs-lisp
(after! org
;; ---------------------------------------------------------
;; 1. THE REUSABLE ENGINE (Domain Agnostic)
;; ---------------------------------------------------------
(defun my/org-metric-sync-engine (&key prop-name value-current prop-last-done prop-interval target-tag log-label)
"Core logic to sync parent metrics to sub-tasks and log changes.
PROP-NAME: The property triggering the change (e.g., LAST_KM).
VALUE-CURRENT: The new value being set.
PROP-LAST-DONE: Sub-task property for 'baseline' (e.g., LAST_DONE_KM).
PROP-INTERVAL: Sub-task property for 'frequency' (e.g., INTERVAL_KM).
TARGET-TAG: Filter for specific sub-tasks (e.g., SERVICE).
LOG-LABEL: The prefix used in the Logbook entry."
(save-excursion
;; A. Log the update to the Logbook with a timestamp
(when log-label
(org-add-log-setup 'note (format "%s: %s" log-label value-current) nil 'findpos))
;; B. Narrow scope to current header and scan sub-tasks
(org-narrow-to-subtree)
(org-map-entries
(lambda ()
(let* ((last-done (string-to-number (or (org-entry-get nil prop-last-done) "0")))
(interval (string-to-number (or (org-entry-get nil prop-interval) "0")))
(current (string-to-number value-current)))
;; Only process tasks that have an interval set
(when (> interval 0)
(if (>= current (+ last-done interval))
(org-todo "TODO")
(org-todo "HOLD")))))
target-tag)
(widen)))
(defun my/org-metric-prompt-engine (&key state tag prop-parent-metric prop-task-done label-prompt)
"Core logic to prompt for values when a task is marked DONE.
STATE: The new TODO state (e.g., DONE).
TAG: The tag identifying relevant tasks.
PROP-PARENT-METRIC: The property on the parent to update (e.g., LAST_KM).
PROP-TASK-DONE: The property on the task to update (e.g., LAST_DONE_KM).
LABEL-PROMPT: The text shown in the minibuffer."
(when (string= state "DONE")
(let ((tags (org-get-tags)))
(when (member tag tags)
(save-excursion
;; Inherit parent metric as the default value for the prompt
(let* ((current-val (org-entry-get nil prop-parent-metric t))
(input-val (read-string (format "%s (default %s): " label-prompt (or current-val "0"))
nil nil current-val)))
;; 1. Update the task property
(org-set-property prop-task-done input-val)
;; 2. Update the parent property (triggers the sync engine)
(save-excursion
(when (org-up-heading-safe)
(org-set-property prop-parent-metric input-val)))
(message "Synchronized %s to %s" label-prompt input-val)))))))
;; ---------------------------------------------------------
;; 2. THE DISPATCHERS (The Switchboard)
;; ---------------------------------------------------------
(defun my/org-property-change-handler (prop value)
"Routes property changes to the correct sync parameters."
(cond
;; Case: F-150 Odometer
((string= prop "LAST_KM")
(my/org-metric-sync-engine
:prop-name prop :value-current value :prop-last-done "LAST_DONE_KM"
:prop-interval "INTERVAL_KM" :target-tag "SERVICE" :log-label "Odometer Update"))))
;; Case: Equipment/Industrial Hours
;; ((string= prop "LAST_HOURS")
;; (my/org-metric-sync-engine
;; :prop-name prop :value-current value :prop-last-done "LAST_DONE_HOURS"
;; :prop-interval "INTERVAL_HOURS" :target-tag "MAINTENANCE" :log-label "Usage Hours Logged"))))
(defun my/org-todo-state-handler ()
"Safely routes DONE completions, catching any argument errors."
(interactive)
(condition-case err
(when (string= org-state "DONE")
(my/org-metric-prompt-engine
:state "DONE"
:tag "SERVICE"
:prop-parent-metric "LAST_KM"
:prop-task-done "LAST_DONE_KM"
:label-prompt "Current Odometer"))
(error (message "Handler suppressed error: %s" (error-message-string err)))))
)
;; (my/org-metric-prompt-engine
;; :state org-state :tag "MAINTENANCE" :prop-parent-metric "LAST_HOURS"
;; :prop-task-done "LAST_DONE_HOURS" :label-prompt "Equipment Hours"))
;; ---------------------------------------------------------
;; 3. THE HOOKS
;; ---------------------------------------------------------
(add-hook 'org-after-prop-change-hook #'my/org-property-change-handler)
(add-hook 'org-after-todo-state-change-hook #'my/org-todo-state-handler)
#+end_src
* Custom for rescheduling task later
#+begin_src emacs-lisp
(defun my/org-smart-advance-date ()
"Jump to next repeater occurrence or add 1 day.
Suppresses all logging, notes, and custom odometer hooks."
(interactive)
(let ((org-log-done nil)
(org-log-repeat nil)
(org-todo-repeat-to-state "LOOP")
(org-after-todo-state-change-hook nil)
(org-treat-insert-todo-log-note nil)
(inhibit-modification-hooks t))
(let ((is-agenda (derived-mode-p 'org-agenda-mode)))
(cond
;; Case 1: Task has a repeater (teleport to next date)
((if is-agenda
(org-agenda-with-point-at-orig-entry nil (org-get-repeat))
(org-get-repeat))
;; This surgical strike prevents the Logbook entry entirely
(cl-letf (((symbol-function 'org-add-log-setup) (lambda (&rest _args) nil)))
(if is-agenda (org-agenda-todo "DONE") (org-todo "DONE")))
(message "Silently jumped to next occurrence."))
;; Case 2: No repeater, fallback to standard +1 day shift
(t
(if is-agenda
(org-agenda-date-later 1)
(org-timestamp-change 1 'day))
(message "No repeater found: Added 1 day."))))))
(map! :after org
(:map org-mode-map
:localleader "L" #'my/org-smart-advance-date)
(:map org-agenda-mode-map
:localleader "L" #'my/org-smart-advance-date))
#+end_src
* Custom function Open link in other frame
@@ -3022,4 +3223,3 @@ Need chrome... :(
:localleader
:desc "Edit Edna rules" "E" #'org-edna-edit))
#+end_src

View File

@@ -18,7 +18,9 @@
(map! :leader
(:prefix ("w" . "window")
:desc "Minimize window" "O" #'minimize-window))
:desc "Minimize window" "O" #'minimize-window)
(:prefix ("z" . "Personal")
:desc "Hermes Agent" "h" #'gortium/hermes-vterm))
(use-package! ultra-scroll
:init
@@ -50,12 +52,11 @@
(defalias 'getf #'cl-getf))
(setq
org-directory "~/ExoKortex/"
+org-capture-todo-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-notes-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-journal-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-emails-file "~/ExoKortex/2-Areas/Meta-Planning/Org/Core/master_list.org"
+org-capture-todo-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-notes-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-journal-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
+org-capture-emails-file "~/ExoKortex/3-Telos/5-Kernel/inbox.org"
;; +org-capture-central-project-todo-file '"refile.org"
;; +org-capture-project-todo-file '"refile.org"
org-agenda-files (directory-files-recursively "~/ExoKortex/" "\\.org$")
@@ -236,15 +237,34 @@
("p" . "Personal commands")
("wg" "GTD view"
(
(agenda "" ((org-agenda-span 'week)))
(todo "STRT" ((org-agenda-overriding-header gtd/started-head)))
(todo "NEXT" ((org-agenda-overriding-header gtd/next-action-head)))
(todo "WAIT" ((org-agenda-overriding-header gtd/waiting-head)))
(agenda "" ((org-agenda-span 'week)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "STRT" ((org-agenda-overriding-header gtd/started-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "NEXT" ((org-agenda-overriding-header gtd/next-action-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "WAIT" ((org-agenda-overriding-header gtd/waiting-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
;; (todo "DONE" ((org-agenda-overriding-header gtd/complete-head)))
(stuck "" ((org-stuck-projects '("TODO=\"PROJ\"" ("NEXT" "STRT") nil ""))
(org-agenda-overriding-header gtd/project-head)))
(todo "IDEA" ((org-agenda-overriding-header gtd/someday-head)))
(org-agenda-overriding-header gtd/project-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
(todo "IDEA" ((org-agenda-overriding-header gtd/someday-head)
(org-agenda-prefix-format " %12t") ;; reserve time space
(org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO
))
)
((org-agenda-tag-filter-preset '("+work")))
)
("pg" "GTD view"
@@ -346,10 +366,10 @@
)))
((org-agenda-tag-filter-preset '("+BA_ON_SITE")))
)
)
)
)
)
(after! org
;; Rust code block setting
@@ -357,17 +377,59 @@
)
(after! org
(setq
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
;; LaTeX math preview
org-format-latex-options '(:foreground default :background default :scale 2 :html-foreground "Black"
:html-background "Transparent" :html-scale 1.0
:matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
)
;; 1. Use XeLaTeX to generate the intermediate file for dvisvgm
;; This handles UTF-8 (like long dashes) which standard 'latex' crashes on.
(setq org-preview-latex-process-alist
'((dvisvgm
:programs ("xelatex" "dvisvgm")
:description "xdv to svg"
:message "rendering %f via xelatex..."
:image-input-type "xdv"
:image-output-type "svg"
:image-size-adjust (1.0 . 1.0)
:latex-compiler ("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f")
:image-converter ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))))
(setq org-preview-latex-default-process 'dvisvgm)
(defun gortium/org-latex-preview-all ()
"Render all LaTeX fragments in the buffer."
(interactive)
(when (derived-mode-p 'org-mode)
(org-latex-preview '(16))))
;; 1.5s delay to ensure Doom font-colors load first
;; (add-hook 'org-mode-hook
;; (lambda ()
;; (run-with-idle-timer 1.5 nil #'gortium/org-latex-preview-all)))
)
(after! ox-latex
(setq org-latex-compiler "xelatex"))
(setq org-latex-src-block-backend 'listings)
(add-to-list 'org-latex-packages-alist '("" "listings") t)
(add-to-list 'org-latex-packages-alist '("" "xcolor") t)
(add-to-list 'org-latex-listings-langs '(text ""))
(setq org-latex-listings-options
'(("breaklines" "true")
("basicstyle" "\\small\\ttfamily")
("frame" "single")
("backgroundcolor" "\\color{gray!10}"))))
(use-package! org-fragtog
:hook (org-mode . org-fragtog-mode))
(defun gortium/org-latex-refresh-on-zoom (&rest _)
(when (derived-mode-p 'org-mode)
(let ((new-scale (+ 2 (* 0.5 (if (boundp 'text-scale-mode-amount) text-scale-mode-amount 0)))))
(setq org-format-latex-options
(plist-put org-format-latex-options :scale new-scale))
(org-clear-latex-preview)
(gortium/org-latex-preview-all))))
(advice-add 'text-scale-increase :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-decrease :after #'gortium/org-latex-refresh-on-zoom)
(after! org
(setq
@@ -446,7 +508,7 @@
(add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
(setq org-roam-directory (file-truename "~/ExoKortex/")
org-roam-db-location (file-truename "~/ExoKortex/2-Areas/IT/Roam/org-roam.db")
org-roam-db-location (file-truename "~/ExoKortex/1-Soma/2-Areas/IT/Roam/org-roam.db")
org-attach-id-dir "assets/"
org-roam-dailies-directory "~/ExoKortex/2-Areas/Meta-Planning/Org/Journal/Daily")
@@ -675,14 +737,14 @@ Handles org-clock and context link capture for tasks."
(after! ispell
(setq ispell-program-name "hunspell"
ispell-dictionary "en_CA,fr_CA"
ispell-personal-dictionary "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/perso.dic")
ispell-personal-dictionary "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/perso.dic")
;; Set the dictionary path environment variable
(setenv "DICPATH" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries")
(setenv "DICPATH" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries")
(setq ispell-hunspell-dict-paths-alist
'(("fr_CA" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/fr_CA.aff")
("en_CA" "/home/tpouplier/ExoKortex/2-Areas/IT/Dictionaries/en_CA.aff")))
'(("fr_CA" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/fr_CA.aff")
("en_CA" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries/en_CA.aff")))
(setq ispell-hunspell-dictionary-alist
'(("fr_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "fr_CA") nil utf-8)
@@ -805,29 +867,6 @@ Handles org-clock and context link capture for tasks."
(add-to-list 'auto-mode-alist '("\\.hledger\\'" . hledger-mode))
)
;; Hook fragtog to org-mode to have editable latex preview
(use-package! org-fragtog
:hook (org-mode . org-fragtog-mode))
;; Rescale latex preview when changing font size
(defun gortium/org-latex-refresh-on-zoom (&rest _)
"Dynamically rescale and refresh all LaTeX previews after text zoom."
(when (derived-mode-p 'org-mode)
;; Dynamically update scale relative to zoom level
(setq org-format-latex-options
(plist-put org-format-latex-options
:scale (+ 2 (* 0.5 text-scale-mode-amount))
))
;; Clear all previews
(org-clear-latex-preview)
;; Re-render all previews
(org-latex-preview '(16))
))
(advice-add 'text-scale-increase :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-decrease :after #'gortium/org-latex-refresh-on-zoom)
(advice-add 'text-scale-set :after #'gortium/org-latex-refresh-on-zoom)
(use-package! age
:demand t
:config
@@ -891,11 +930,11 @@ Handles org-clock and context link capture for tasks."
;; rebind function value for pass to passage
(fset #'pass (lambda () (interactive) (passage)))
(setq age-program "rage")
(setq auth-source-passage-filename (expand-file-name "~/ExoKortex/2-Areas/IT/dotfiles/secrets"))
(setq auth-source-passage-filename (expand-file-name "~/ExoKortex/4-Automata/dotfiles/secrets"))
(setenv "PASSAGE_IDENTITIES_FILE" (expand-file-name age-default-identity))
(setenv "PASSAGE_RECIPIENTS_FILE" (expand-file-name age-default-recipient))
(setenv "PASSAGE_AGE" "rage")
(setenv "PASSAGE_DIR" (expand-file-name "~/ExoKortex/2-Areas/IT/dotfiles/secrets"))
(setenv "PASSAGE_DIR" (expand-file-name "~/ExoKortex/4-Automata/dotfiles/secrets"))
)
(diff-hl-mode +1)
@@ -934,7 +973,8 @@ Handles org-clock and context link capture for tasks."
deepseek/deepseek-chat-v3-0324:free
meta-llama/llama-4-maverick:free
mistralai/devstral-2512:free
qwen/qwen3-coder:free))
qwen/qwen3-coder:free
nvidia/nemotron-3-nano-30b-a3b:free))
(gptel-make-gemini "Gemini"
:key (auth-source-passage-get 'secret "gemini")
:stream t
@@ -1015,6 +1055,20 @@ DIFF:
:desc "GPT generate commit"
"g" #'gortium/magit-gptel-generate-commit)
(after! vterm
(defun gortium/hermes-vterm ()
"Launch Hermes Agent in vterm via SSH to lazyworkhorse (CLI mode)."
(interactive)
(let ((buf (get-buffer-create "*hermes*")))
(switch-to-buffer buf)
(unless (and (eq major-mode 'vterm-mode)
(get-buffer-process buf))
(vterm-mode)
(let ((proc (get-buffer-process buf)))
(when proc
(process-send-string
proc "ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'\n")))))))
;; set `tramp-direct-async-process' locally in all ssh connections
(connection-local-set-profile-variables
'remote-direct-async-process
@@ -1150,14 +1204,50 @@ DIFF:
(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
org-msg-startup "hidestars indent inlineimages"
org-msg-greeting-fmt "\nBonjour%s,\n\n"
;; org-msg-recipient-names '(("jeremy.compostella@gmail.com" . "Jérémy"))
org-msg-greeting-name-limit 1
org-msg-default-alternatives '((new . (text html))
(reply-to-html . (text html))
(reply-to-text . (text)))
org-msg-convert-citation t
org-msg-signature "
org-msg-convert-citation t)
)
(after! mu4e
(setq mu4e-maildir-shortcuts mu4e-maildir-list mu4e-maildir-initial-input mu4e-maildir-info-delimiter)
(setq mu4e-contexts
(list
;; --- CONTEXT: TDNDE ---
(make-mu4e-context
:name "TDNDE"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/TDNDE/" (mu4e-message-field msg :maildir))))
:vars
'((user-mail-address . "tpouplier@tdnde.com")
(user-full-name . "Thierry Pouplier")
;; Folders
(mu4e-sent-folder . "/TDNDE/Sent")
(mu4e-drafts-folder . "/TDNDE/Drafts")
(mu4e-trash-folder . "/TDNDE/Trash")
(mu4e-refile-folder . "/TDNDE/Archive")
;; Shortcuts
(mu4e-maildir-shortcuts . (("/TDNDE/Inbox" . ?i)
("/TDNDE/Sent" . ?s)
("/TDNDE/Drafts" . ?d)
("/TDNDE/Trash" . ?t)
("/TDNDE/Archive" . ?a)))
;; SMTP
(smtpmail-smtp-user . "tpouplier@tdnde.com")
(smtpmail-stream-type . ssl)
(smtpmail-smtp-server . "smtp.hostinger.com")
(smtpmail-smtp-service . 465)
(mu4e-sent-messages-behavior . sent)
;; Context-specific signature
(org-msg-signature . "
Cdlt,
#+begin_signature
@@ -1171,93 +1261,66 @@ Tél. : +1 (450) 667-1884 \\\\
Cell. : +1 (514) 887-1674 \\\\
tpouplier@tdnde.com \\\\
www.tdnde.com \\\\
#+end_signature")
)
#+end_signature")))
(after! mu4e
(setq mu4e-maildir-shortcuts mu4e-maildir-list mu4e-maildir-initial-input mu4e-maildir-info-delimiter)
(setq mu4e-contexts
(list
;; --- CONTEXT: Perso ---
(make-mu4e-context
:name "TDNDE"
:match-func
(lambda (msg)
(when msg
(string-prefix-p
"/TDNDE/"
(mu4e-message-field msg :maildir))))
:vars
'((user-mail-address . "tpouplier@tdnde.com")
(user-full-name . "Thierry Pouplier")
:name "Perso"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/Perso/" (mu4e-message-field msg :maildir))))
:vars `((user-mail-address . "thierrypouplier@gmail.com")
(user-full-name . "Thierry Pouplier")
(mu4e-sent-folder . "/Perso/Sent")
(mu4e-drafts-folder . "/Perso/Drafts")
(mu4e-trash-folder . "/Perso/Trash")
(mu4e-refile-folder . "/Perso/Archive")
(mu4e-maildir-shortcuts . (("/Perso/Inbox" . ?i)
("/Perso/Sent" . ?s)
("/Perso/Trash" . ?t)
("/Perso/Drafts" . ?d)
("/Perso/Archive" . ?a)))
(smtpmail-smtp-user . "thierrypouplier@gmail.com")
(smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-service . 587)
(smtpmail-stream-type . starttls)
(mu4e-sent-messages-behavior . sent)
(org-msg-signature . "
Cordialement,
;; Folders
(mu4e-sent-folder . "/TDNDE/Sent")
(mu4e-drafts-folder . "/TDNDE/Drafts")
(mu4e-trash-folder . "/TDNDE/Trash")
(mu4e-refile-folder . "/TDNDE/Archive")
;; Shortcuts
(mu4e-maildir-shortcuts
.
(("/TDNDE/Inbox" . ?i)
("/TDNDE/Sent" . ?s)
("/TDNDE/Drafts" . ?d)
("/TDNDE/Trash" . ?t)
("/TDNDE/Archive" . ?a)))
;; Bookmarks
(mu4e-bookmarks
.
((:name "Airbus-6825"
:query "maildir:/TDNDE/* AND label:proj:6825 AND label:client:airbus"
:key ?A)
(:name "Bombardier-3154"
:query "maildir:/TDNDE/* AND label:proj:3154 AND label:client:bombardier"
:key ?B)
(:name "Daher-5304"
:query "maildir:/TDNDE/* AND label:proj:5304 AND label:client:daher"
:key ?D)
(:name "TDNDE"
:query "maildir:/TDNDE/* AND label:tdnde"
:key ?T)))
;; SMTP
(smtpmail-smtp-user . "tpouplier@tdnde.com")
(smtpmail-stream-type . ssl)
(smtpmail-smtp-server . "smtp.hostinger.com")
(smtpmail-smtp-service . 465)))
;; Other context here
;; (make-mu4e-context ...)
)
)
#+begin_signature
--
*Thierry Pouplier* \\
(514) 887-1674 | thierrypouplier@gmail.com
#+end_signature"))))) ;; End of mu4e-contexts list
(setq mu4e-context-policy 'pick-first
mu4e-compose-context-policy 'ask)
(require 'mu4e-icalendar)
(mu4e-icalendar-setup)
(setq mu4e-icalendar-diary-file nil)
(setq gnus-icalendar-org-capture-file +org-capture-journal-file
gnus-icalendar-org-capture-headline '("Journal"))
(gnus-icalendar-org-setup)
)
;; Separate after! blocks for clarity
(after! mu4e
(setq mu4e-modeline-support nil))
(after! mu4e
;; restore label key
(evil-define-key 'normal mu4e-headers-mode-map"l" #'mu4e-headers-mark-for-label)
(evil-define-key 'normal mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'visual mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'emacs mu4e-headers-mode-map "l" #'mu4e-headers-mark-for-label)
(evil-define-key 'normal mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
(evil-define-key 'visual mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
(evil-define-key 'emacs mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)
)
(evil-define-key 'emacs mu4e-view-mode-map "l" #'mu4e-view-mark-for-label)))
(defun gortium-circe-nickserv-password (server)
(auth-source-passage-get 'secret "irc"))
@@ -1821,6 +1884,138 @@ and ensure the standard property drawer exists without overwriting existing data
(lambda () (org-id-get-create))
nil 'tree)))
(after! org
;; ---------------------------------------------------------
;; 1. THE REUSABLE ENGINE (Domain Agnostic)
;; ---------------------------------------------------------
(defun my/org-metric-sync-engine (&key prop-name value-current prop-last-done prop-interval target-tag log-label)
"Core logic to sync parent metrics to sub-tasks and log changes.
PROP-NAME: The property triggering the change (e.g., LAST_KM).
VALUE-CURRENT: The new value being set.
PROP-LAST-DONE: Sub-task property for 'baseline' (e.g., LAST_DONE_KM).
PROP-INTERVAL: Sub-task property for 'frequency' (e.g., INTERVAL_KM).
TARGET-TAG: Filter for specific sub-tasks (e.g., SERVICE).
LOG-LABEL: The prefix used in the Logbook entry."
(save-excursion
;; A. Log the update to the Logbook with a timestamp
(when log-label
(org-add-log-setup 'note (format "%s: %s" log-label value-current) nil 'findpos))
;; B. Narrow scope to current header and scan sub-tasks
(org-narrow-to-subtree)
(org-map-entries
(lambda ()
(let* ((last-done (string-to-number (or (org-entry-get nil prop-last-done) "0")))
(interval (string-to-number (or (org-entry-get nil prop-interval) "0")))
(current (string-to-number value-current)))
;; Only process tasks that have an interval set
(when (> interval 0)
(if (>= current (+ last-done interval))
(org-todo "TODO")
(org-todo "HOLD")))))
target-tag)
(widen)))
(defun my/org-metric-prompt-engine (&key state tag prop-parent-metric prop-task-done label-prompt)
"Core logic to prompt for values when a task is marked DONE.
STATE: The new TODO state (e.g., DONE).
TAG: The tag identifying relevant tasks.
PROP-PARENT-METRIC: The property on the parent to update (e.g., LAST_KM).
PROP-TASK-DONE: The property on the task to update (e.g., LAST_DONE_KM).
LABEL-PROMPT: The text shown in the minibuffer."
(when (string= state "DONE")
(let ((tags (org-get-tags)))
(when (member tag tags)
(save-excursion
;; Inherit parent metric as the default value for the prompt
(let* ((current-val (org-entry-get nil prop-parent-metric t))
(input-val (read-string (format "%s (default %s): " label-prompt (or current-val "0"))
nil nil current-val)))
;; 1. Update the task property
(org-set-property prop-task-done input-val)
;; 2. Update the parent property (triggers the sync engine)
(save-excursion
(when (org-up-heading-safe)
(org-set-property prop-parent-metric input-val)))
(message "Synchronized %s to %s" label-prompt input-val)))))))
;; ---------------------------------------------------------
;; 2. THE DISPATCHERS (The Switchboard)
;; ---------------------------------------------------------
(defun my/org-property-change-handler (prop value)
"Routes property changes to the correct sync parameters."
(cond
;; Case: F-150 Odometer
((string= prop "LAST_KM")
(my/org-metric-sync-engine
:prop-name prop :value-current value :prop-last-done "LAST_DONE_KM"
:prop-interval "INTERVAL_KM" :target-tag "SERVICE" :log-label "Odometer Update"))))
;; Case: Equipment/Industrial Hours
;; ((string= prop "LAST_HOURS")
;; (my/org-metric-sync-engine
;; :prop-name prop :value-current value :prop-last-done "LAST_DONE_HOURS"
;; :prop-interval "INTERVAL_HOURS" :target-tag "MAINTENANCE" :log-label "Usage Hours Logged"))))
(defun my/org-todo-state-handler ()
"Safely routes DONE completions, catching any argument errors."
(interactive)
(condition-case err
(when (string= org-state "DONE")
(my/org-metric-prompt-engine
:state "DONE"
:tag "SERVICE"
:prop-parent-metric "LAST_KM"
:prop-task-done "LAST_DONE_KM"
:label-prompt "Current Odometer"))
(error (message "Handler suppressed error: %s" (error-message-string err)))))
)
;; (my/org-metric-prompt-engine
;; :state org-state :tag "MAINTENANCE" :prop-parent-metric "LAST_HOURS"
;; :prop-task-done "LAST_DONE_HOURS" :label-prompt "Equipment Hours"))
;; ---------------------------------------------------------
;; 3. THE HOOKS
;; ---------------------------------------------------------
(add-hook 'org-after-prop-change-hook #'my/org-property-change-handler)
(add-hook 'org-after-todo-state-change-hook #'my/org-todo-state-handler)
(defun my/org-smart-advance-date ()
"Jump to next repeater occurrence or add 1 day.
Suppresses all logging, notes, and custom odometer hooks."
(interactive)
(let ((org-log-done nil)
(org-log-repeat nil)
(org-todo-repeat-to-state "LOOP")
(org-after-todo-state-change-hook nil)
(org-treat-insert-todo-log-note nil)
(inhibit-modification-hooks t))
(let ((is-agenda (derived-mode-p 'org-agenda-mode)))
(cond
;; Case 1: Task has a repeater (teleport to next date)
((if is-agenda
(org-agenda-with-point-at-orig-entry nil (org-get-repeat))
(org-get-repeat))
;; This surgical strike prevents the Logbook entry entirely
(cl-letf (((symbol-function 'org-add-log-setup) (lambda (&rest _args) nil)))
(if is-agenda (org-agenda-todo "DONE") (org-todo "DONE")))
(message "Silently jumped to next occurrence."))
;; Case 2: No repeater, fallback to standard +1 day shift
(t
(if is-agenda
(org-agenda-date-later 1)
(org-timestamp-change 1 'day))
(message "No repeater found: Added 1 day."))))))
(map! :after org
(:map org-mode-map
:localleader "L" #'my/org-smart-advance-date)
(:map org-agenda-mode-map
:localleader "L" #'my/org-smart-advance-date))
;; Open link in another frame
(defun gortium/org-open-link-in-other-frame ()
"Open the Org link at point in another frame."

View File

@@ -147,7 +147,8 @@ animations {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
# Note: pseudotile variable removed in 0.55+. Use `pseudo` dispatcher to toggle per-window.
# Bound to $mainMod + P below.
# This prevents the layout from collapsing if you close one window
preserve_split = true # You probably want this
@@ -213,20 +214,25 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
bind = $mainMod, T, exec, $terminal
bind = $mainMod, D, killactive,
bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, U, exec, ~/ExoKortex/2-Areas/IT/dotfiles/scripts/make_all.sh
bind = $mainMod, U, exec, ~/ExoKortex/4-Automata/dotfiles/scripts/make_all.sh
bind = $mainMod, M, exec, $monitoring
bind = $mainMod, E, exec, $editor
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, Z, exec, $zen
#bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, P, togglesplit, # dwindle
# togglesplit removed as standalone dispatcher in 0.55+; use `layoutmsg togglesplit` instead
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, N, movecurrentworkspacetomonitor, -1
bind = $mainMod SHIFT, N, movecurrentworkspacetomonitor, +1
bind = $mainMod, X, swapwindow
bind = $mainMod, B, exec, python /home/tpouplier/ExoKortex/1-Projects/Perso/recordntrans/record_transcribe.py
bind = $mainMod, B, exec, python /home/tpouplier/ExoKortex/4-Automata/recordntrans/record_transcribe.py
# bind = $mainMod, G, exec, nerd-dictation end
bind = $mainMod, A, exec, $music
bind = $mainMod, C, exec, emacsclient -n -c -e '(gortium/hermes-vterm)'
# WireGuard VPN toggle (uses config file: /etc/wireguard/work-laptop.conf)
bind = $mainMod CTRL, V, exec, sudo wg-quick up work-laptop
bind = $mainMod CTRL SHIFT, V, exec, sudo wg-quick down work-laptop
# Full screen
bind = SUPER, F, fullscreen

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=QET (Xephyr)
Comment=QElectroTech in nested X server for Wayland compatibility
Exec=/home/tpouplier/ExoKortex/4-Automata/dotfiles/scripts/qet-xephyr.sh
Icon=qelectrotech
Type=Application
Categories=Graphics;Engineering;
Terminal=false

View File

@@ -1,5 +1,5 @@
#!/bin/bash
cd ~/ExoKortex/2-Areas/IT/dotfiles/
cd ~/ExoKortex/4-Automata/dotfiles/
make all
if [ $? -eq 0 ]; then
notify-send "Dotfiles" "Configuration reloaded successfully!"

21
scripts/qet-xephyr.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Launch QElectroTech in a nested Xephyr X server with Openbox
# Works around Wayland drag-and-drop issue in QET
XEPHYR_PID=""
cleanup() {
kill $XEPHYR_PID 2>/dev/null
exit 0
}
trap cleanup SIGINT SIGTERM
Xephyr -screen 1920x1080 :1 -title QET -br &
XEPHYR_PID=$!
sleep 1
DISPLAY=:1 openbox &
sleep 0.5
DISPLAY=:1 qelectrotech &
wait $XEPHYR_PID

View File

@@ -33,7 +33,7 @@ if systemctl --user is-active --quiet rclone_ftp_mount.service; then
echo "Rclone service is already running."
else
echo "Starting the rclone service."
systemctl start rclone_ftp_mount.service || { echo "Failed to start the service"; exit 1; }
systemctl --user start rclone_ftp_mount.service || { echo "Failed to start the service"; exit 1; }
fi
echo "Post-installation steps for rclone completed successfully."

129
scripts/wireguard-status.sh Executable file
View File

@@ -0,0 +1,129 @@
#!/usr/bin/env bash
# wireguard-status.sh -- JSON status for Waybar
# Outputs: {"text":"...","class":"connected|disconnected","tooltip":"..."}
#
# Waybar config example (in ~/.config/waybar/config.jsonc):
# "custom/wireguard": {
# "exec": "$HOME/.config/waybar/scripts/wireguard-status.sh",
# "interval": 10,
# "return-type": "json"
# }
set -euo pipefail
# --- Config -------------------------------------------------------
ICON_LOCKED="\uf023" # nf-fa-lock (FontAwesome)
ICON_UNLOCKED="\uf09e" # nf-fa-unlock
# Override with environment variables if set:
ICON_LOCKED="${WG_ICON_LOCKED:-$ICON_LOCKED}"
ICON_UNLOCKED="${WG_ICON_UNLOCKED:-$ICON_UNLOCKED}"
# --- Helpers ------------------------------------------------------
die() { echo "$*" >&2; exit 1; }
# Find the wg binary — works on NixOS, standard Linux, etc.
find_wg() {
if command -v wg &>/dev/null; then
echo "wg"
elif [ -x /run/current-system/sw/bin/wg ]; then
echo "/run/current-system/sw/bin/wg"
elif [ -x /usr/bin/wg ]; then
echo "/usr/bin/wg"
else
return 1
fi
}
# Find the ip binary
find_ip() {
if command -v ip &>/dev/null; then
echo "ip"
elif [ -x /run/current-system/sw/bin/ip ]; then
echo "/run/current-system/sw/bin/ip"
elif [ -x /usr/sbin/ip ]; then
echo "/usr/sbin/ip"
elif [ -x /sbin/ip ]; then
echo "/sbin/ip"
else
return 1
fi
}
format_bytes() {
local bytes=$1
if [ "$bytes" -lt 1024 ]; then
echo "${bytes}B"
elif [ "$bytes" -lt $((1024 * 1024)) ]; then
echo "$(awk "BEGIN { printf \"%.1f KiB\", $bytes / 1024 }")"
elif [ "$bytes" -lt $((1024 * 1024 * 1024)) ]; then
echo "$(awk "BEGIN { printf \"%.1f MiB\", $bytes / (1024 * 1024) }")"
else
echo "$(awk "BEGIN { printf \"%.2f GiB\", $bytes / (1024 * 1024 * 1024) }")"
fi
}
# --- Main ---------------------------------------------------------
WG_BIN=$(find_wg 2>/dev/null) || {
# wg not installed — report as disconnected
printf '{"text":"%s","class":"disconnected","tooltip":"WireGuard not installed"}\n' "$ICON_UNLOCKED"
exit 0
}
IP_BIN=$(find_ip 2>/dev/null) || true
# Find all WireGuard interfaces
INTERFACES=$("$WG_BIN" show interfaces 2>/dev/null) || {
# No WireGuard interfaces exist (wg module not loaded?)
printf '{"text":"%s","class":"disconnected","tooltip":"No WireGuard interfaces"}\n' "$ICON_UNLOCKED"
exit 0
}
# Parse into array, handling possible single-line space-separated output
IFS=' ' read -ra ifaces <<< "$INTERFACES"
if [ ${#ifaces[@]} -eq 0 ]; then
printf '{"text":"%s","class":"disconnected","tooltip":"No WireGuard interfaces"}\n' "$ICON_UNLOCKED"
exit 0
fi
# Just use the first interface (most setups have one)
IFACE="${ifaces[0]}"
# Get transfer stats
TRANSFER=$("$WG_BIN" show "$IFACE" transfer 2>/dev/null) || {
printf '{"text":"%s","class":"disconnected","tooltip":"Cannot read stats for %s"}\n' "$ICON_UNLOCKED" "$IFACE"
exit 0
}
# Parse: "rx_bytes tx_bytes"
RX_BYTES=$(echo "$TRANSFER" | awk '{print $1}')
TX_BYTES=$(echo "$TRANSFER" | awk '{print $2}')
RX_HUMAN=$(format_bytes "${RX_BYTES:-0}")
TX_HUMAN=$(format_bytes "${TX_BYTES:-0}")
# Get endpoint info for tooltip
ENDPOINT=$("$WG_BIN" show "$IFACE" endpoints 2>/dev/null | head -1 | awk '{print $2}') || ENDPOINT=""
PEER=$("$WG_BIN" show "$IFACE" peers 2>/dev/null | head -1) || PEER=""
# Build status line
STATUS_TEXT="${ICON_LOCKED} \u2193${RX_HUMAN} \u2191${TX_HUMAN}"
# Build tooltip
TOOLTIP="${IFACE}"
if [ -n "$PEER" ]; then
TOOLTIP="${TOOLTIP}\nPeer: ${PEER}"
fi
if [ -n "$ENDPOINT" ]; then
TOOLTIP="${TOOLTIP}\nEndpoint: ${ENDPOINT}"
fi
# Add IP info if ip is available
if [ -n "$IP_BIN" ]; then
IFACE_IP=$("$IP_BIN" -4 addr show dev "$IFACE" 2>/dev/null | awk '/inet / {print $2}') || IFACE_IP=""
if [ -n "$IFACE_IP" ]; then
TOOLTIP="${TOOLTIP}\nIP: ${IFACE_IP}"
fi
fi
TOOLTIP="${TOOLTIP}\nRX: ${RX_HUMAN}\nTX: ${TX_HUMAN}"
printf '{"text":"%s","class":"connected","tooltip":"%s"}\n' "$STATUS_TEXT" "$TOOLTIP"

9
secrets/perso-mail.age Normal file
View File

@@ -0,0 +1,9 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IEdoTUQ4QSBSTnZa
REtrM2FwSngxY2FRWkdsWWNUU0JETW81eWYwUE9Ndy9TT096UFRnClRzbTJnWEhG
WlAvVlhicjA0Um45TFZNL3VQaDBSMHNaWG1TOEthN1RrVlkKLT4gUXFLVUQ9Xnwt
Z3JlYXNlIDIiIDdnPmZfQCBEClVpYVcxSEMvbnp0VFptdWtENmdQZUtYK05uUVFO
ZWRtCi0tLSBIcGNFcXVKOWhjS3lGZUdNaDd3N2dMN21KT2JhUzIrWHc0UHFOcFlq
TWRzClWaMFgCPM9T0pLoh/HyXVwAALd3fPUKll/VFjHa4eJIGjGa36g5lxU7BxTa
39fa8FNrSHU=
-----END AGE ENCRYPTED FILE-----

View File

@@ -28,6 +28,7 @@
"pulseaudio",
"bluetooth",
"network",
"custom/wireguard",
"battery",
"custom/exit"
]

View File

@@ -138,6 +138,15 @@
//"on-click": "~/dotfiles/.settings/networkmanager.sh"
},
// wireguard
"custom/wireguard": {
"exec": "$HOME/.config/waybar/scripts/wireguard-status.sh",
"interval": 10,
"return-type": "json",
"on-click": "kitty sudo wg-quick up work-laptop",
"on-click-right": "kitty sudo wg-quick down work-laptop"
},
// battery
"battery": {
"states": {

View File

@@ -213,6 +213,21 @@ tooltip label {
}
/* custom modules */
#custom-wireguard {
margin: 0px 0px 0px 5px;
padding: 1px 8px 0px 8px;
font-size: 16px;
color: @text;
border-radius: 5px;
background-color: @set;
}
#custom-wireguard.connected {
background-color: @color5;
}
#custom-wireguard.disconnected {
background-color: @set;
}
#custom-exit {
margin: 0px 18px 0px 5px;
padding: 0px;

View File

@@ -19,6 +19,33 @@ alias emacs="emacsclient -c -a emacs"
# Opencode
alias oc="opencode"
# Hermes Agent - SSH directly to remote server
alias hermes="ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'"
hermes-cp() {
if [ $# -eq 0 ]; then
echo "Usage: hermes-cp <file_or_directory> [...]"
echo ""
echo "Copies files/directories from your Arch laptop into the Hermes"
echo "agent container at /opt/data/home/ preserving directory structure."
echo ""
echo "Examples:"
echo " hermes-cp document.pdf # single file"
echo " hermes-cp *.pdf # multiple files (glob)"
echo " hermes-cp manuals/ # whole directory"
echo " hermes-cp manuals/ keyence-docs/ # multiple items"
echo ""
echo "To copy to a different destination inside the container:"
echo " tar -czf - . | ssh gortium@lazyworkhorse \\"
echo " \"docker exec -i hermes sh -c 'cd /opt/data/projects && tar -xzf -'\""
return 1
fi
# tar everything into a single SSH pipe, extract inside container
# Supports: single files, directories, glob patterns, mixed args
tar -czf - "$@" | ssh gortium@lazyworkhorse \
"docker exec -i hermes sh -c 'cd /opt/data/home && tar -xzf -'"
}
# Yazi
alias y="yazi"
function yy() {