From bf462da94848605e537b62ff07f4d8642205b058 Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Mon, 6 Jul 2026 16:53:38 -0400 Subject: [PATCH] Config dump. --- .stow-local-ignore | 1 + Makefile | 53 ++- doom/.config/doom/README.org | 426 ++++++++++++------ doom/.config/doom/config.el | 396 ++++++++++------ doom/.config/doom/flycheck_init.el | 211 +++++++++ doom/.config/doom/init.el | 6 +- doom/.config/doom/packages.el | 4 +- .../user/exokortex_auto_commit.service | 10 + .../systemd/user/exokortex_auto_commit.timer | 9 + exokortex/.local/bin/exokortex_auto_commit.sh | 29 ++ hypr/.config/hypr/hyprland.conf | 33 +- hypr/.config/hypr/hyprlock.conf | 2 +- .../systemd/user/rclone_ftp_mount.service | 16 +- scripts/exokortex_post_install.sh | 39 ++ scripts/make_all.sh | 2 +- scripts/rclone_post_install.sh | 4 +- zsh/.zshrc | 8 +- 17 files changed, 914 insertions(+), 335 deletions(-) create mode 100644 doom/.config/doom/flycheck_init.el create mode 100644 exokortex/.config/systemd/user/exokortex_auto_commit.service create mode 100644 exokortex/.config/systemd/user/exokortex_auto_commit.timer create mode 100755 exokortex/.local/bin/exokortex_auto_commit.sh create mode 100644 scripts/exokortex_post_install.sh diff --git a/.stow-local-ignore b/.stow-local-ignore index b1b9f74..dfb66d0 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,2 +1,3 @@ archive/ scripts/ +secrets/ diff --git a/Makefile b/Makefile index e7de0fa..6a90d0d 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,40 @@ # Define list of directories you want to stow -CONFIG_DIRS := btop doom hypr kitty local nvim rclone starship tmux wallpapers waybar wireplumber wofi yazi zsh +CONFIG_DIRS := btop doom hypr kitty exokortex nvim rclone starship tmux wallpapers waybar wireplumber wofi yazi zsh -all: stow_all +# Default target for a fully-equipped workstation +all: stow_all stow_rclone stow_exokortex wal -i ~/.config/wallpapers/green_yellow_forest.jpg -o ~/.config/waybar/launch.sh - neofetch + fastfetch -# Main target to handle stowing for all directories except rclone -stow_all: $(filter-out rclone, $(CONFIG_DIRS)) - @echo "Cleaning broken symlinks in ~/.config..." - find ~/.config -xtype l -delete -print - @echo "Removing symlink ~/.zshrc if it exists..." +# Base configurations common to ALL hosts (excludes host-specific network/system automation) +stow_all: $(filter-out rclone exokortex, $(CONFIG_DIRS)) + @echo "Removing legacy shell symlinks if they exist..." @if [ -L $$HOME/.zshrc ]; then rm $$HOME/.zshrc; fi - @echo "Removing symlink ~/.tmux.conf if it exists..." @if [ -L $$HOME/.tmux.conf ]; then rm $$HOME/.tmux.conf; fi - @echo "Stowing all configurations except rclone..." - @$(foreach dir,$(filter-out rclone, $(CONFIG_DIRS)), $(MAKE) stow_$(dir);) + @echo "Stowing baseline configurations..." + @$(foreach dir,$(filter-out rclone exokortex, $(CONFIG_DIRS)), $(MAKE) stow_$(dir);) -# Generic stow command for user-scoped directories +# Generic atomic stow command using Restow (-R) for clean tracking stow_%: - @echo "Stowing $*" - stow -v -t $(HOME) $* + @echo "Stowing package: $*" + stow -R -v -t $(HOME) $* -# Post-installation script for rclone (executed after stowing) -post_install_rclone: +# Dedicated target for rclone (Omit this target on hosts that don't need it) +stow_rclone: + @echo "Stowing rclone securely..." + stow -R -v -t $(HOME) rclone @echo "Running post-installation script for rclone" @bash $(CURDIR)/scripts/rclone_post_install.sh -# Special target for rclone to run post-install after stowing -stow_rclone: - @echo "Cleaning broken symlinks in ~/.config/rclone/..." - find ~/.config/rclone/ -xtype l -delete -print - @echo "Removing symlink ~/.local/bin/rclone_mount_check.sh if it exists..." - @if [ -L $$HOME/.local/bin/rclone_mount_check.sh ]; then rm $$HOME/.local/bin/rclone_mount_check.sh; fi - @echo "Stowing rclone" - stow -v -t $(HOME) rclone - @$(MAKE) post_install_rclone +# Dedicated target for exokortex (Omit this target on sterile servers if needed) +stow_exokortex: + @echo "Stowing exokortex automation layers..." + stow -R -v -t $(HOME) exokortex + @echo "Running post-installation script for exokortex" + @bash $(CURDIR)/scripts/exokortex_post_install.sh + +# Optional: Global cleanup target you only run manually when you want a deep system purge +prune_dead_links: + @echo "Purging all broken symlinks across core configuration profiles..." + find ~/.config -xtype l -delete -print + find ~/.local/bin -xtype l -delete -print diff --git a/doom/.config/doom/README.org b/doom/.config/doom/README.org index fbff679..854c338 100644 --- a/doom/.config/doom/README.org +++ b/doom/.config/doom/README.org @@ -146,6 +146,21 @@ My current workflow consist in having the 3-5 files I work on open in vertical s (super-save-mode +1)) #+end_src +** Paths +#+begin_src emacs-lisp +(defvar dotfiles-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/4-Outputs/dotfiles")) + +(defvar roam-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/2-Assets/Roam")) + +(defvar dict-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/2-Assets/Dictionaries")) + +(defvar journal-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Journal")) +#+end_src + ** Fix #+begin_src emacs-lisp @@ -165,15 +180,19 @@ change ~org-directory~. It must be set before org loads! #+begin_src emacs-lisp (setq - org-directory "~/ExoKortex/" - +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-directory "~/ExoKortex" + +org-capture-todo-file "~/ExoKortex/inbox.org" + +org-capture-notes-file "~/ExoKortex/inbox.org" + +org-capture-journal-file "~/ExoKortex/inbox.org" + +org-capture-emails-file "~/ExoKortex/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$") ) + +(after! org + (setq org-cycle-show-planning-line t) + ) #+end_src ** Refiling @@ -472,12 +491,21 @@ change ~org-directory~. It must be set before org loads! ((agenda "" ((org-agenda-span 'month) (org-agenda-start-day nil) - (org-agenda-overriding-header "📅 Sheduled Tasks")) + (org-agenda-overriding-header "📅 Sheduled Tasks") + (org-agenda-time-grid nil) + (org-agenda-prefix-format " %12t") ;; reserve time space + (org-agenda-todo-keyword-format " ") ;; fixed-width TODO + (org-agenda-tags-column -100) ;; right-align tags + (org-agenda-remove-tags t)) ) (todo "TODO|NEXT|DELG|WAIT|HOLD|STRT|IDEA" ((org-agenda-overriding-header "📋 Unscheduled TODOs") (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) + (org-agenda-prefix-format " %12t") ;; reserve time space + (org-agenda-todo-keyword-format " ") ;; fixed-width TODO + (org-agenda-tags-column -100) ;; right-align tags + (org-agenda-remove-tags t) ) ) ) @@ -498,8 +526,8 @@ change ~org-directory~. It must be set before org loads! ) ("wA" "Projet Airbus Vision" ((agenda "" - ((org-agenda-span 150) - (org-agenda-start-day "2026-05-01") + ((org-agenda-span 120) + (org-agenda-start-day "2026-07-01") (org-agenda-overriding-header "📅 Projet Airbus Vision") (org-agenda-prefix-format " %12t") ;; reserve time space (org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO @@ -925,9 +953,9 @@ Broken for now.. #+begin_src emacs-lisp (setq org-roam-directory (file-truename "~/ExoKortex/") - org-roam-db-location (file-truename "~/ExoKortex/1-Soma/2-Areas/IT/Roam/org-roam.db") + org-roam-db-location (expand-file-name "org-roam.db" roam-base-path) org-attach-id-dir "assets/" - org-roam-dailies-directory "~/ExoKortex/2-Areas/Meta-Planning/Org/Journal/Daily") + org-roam-dailies-directory (expand-file-name "Daily" journal-base-path)) #+end_src ** Custom config @@ -1256,15 +1284,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/1-Soma/2-Areas/IT/Dictionaries/perso.dic") + ispell-personal-dictionary (expand-file-name "perso.dic" dict-base-path)) ;; Set the dictionary path environment variable - (setenv "DICPATH" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries") + (setenv "DICPATH" (expand-file-name dict-base-path)) (setq ispell-hunspell-dict-paths-alist - '(("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"))) - + `(("fr_CA" ,(expand-file-name "fr_CA.aff" dict-base-path)) + ("en_CA" ,(expand-file-name "en_CA.aff" dict-base-path)))) (setq ispell-hunspell-dictionary-alist '(("fr_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "fr_CA") nil utf-8) ("en_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_CA") nil utf-8))) @@ -1499,11 +1526,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/4-Automata/dotfiles/secrets")) + (setq auth-source-passage-filename (expand-file-name "secrets" dotfiles-base-path)) (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/4-Automata/dotfiles/secrets")) + (setenv "PASSAGE_DIR" (expand-file-name "secrets" dotfiles-base-path)) ) #+end_src ** Diff HL Mode @@ -1894,8 +1921,9 @@ Recently added the quick access entries. Game changer. #+begin_src emacs-lisp ;; Dirvish config (after! (dirvish dired) - (require 'async) - (dired-async-mode 1) + ;; Charger l'extension rsync + (require 'dirvish-rsync) + ;; Display icons, file size, timestamps, etc. (setq dirvish-attributes '(nerd-icons @@ -1908,35 +1936,41 @@ Recently added the quick access entries. Game changer. ;; Use a header line instead of the traditional dired modeline (setq dirvish-use-header-line t) - ;; Show dotfile please, ty - ;; (setq dired-omit-mode nil) - ;; (setq dired-listing-switches "-a") - ;; Replace default dired mode globally (dirvish-override-dired-mode) - (require 'dirvish-yank) + ;; Config rsync (les nouvelles variables) + (setq dirvish-rsync-args '("-ah" "--info=progress2")) + (setq dirvish-rsync-use-yank-menu t) + + ;; Remapper 'y' pour utiliser rsync au lieu du batch Emacs + (setq dirvish-yank-keys + '(("y" "Rsync here" dirvish-rsync) + ("m" "Move here" dirvish-move) + ("s" "Make symlinks here" dirvish-symlink) + ("r" "Make relative symlinks here" dirvish-relative-symlink) + ("h" "Make hardlinks here" dirvish-hardlink))) (setq! dirvish-quick-access-entries - `( - ("h" "~/" "Home") - ("k" "~/ExoKortex/2-Areas/Meta-Planning/Org/Core" "ExoKortex") - ("p" "~/ExoKortex/1-Projects" "Projects") - ("a" "~/ExoKortex/2-Areas" "Areas") - ("r" "~/ExoKortex/3-Resources" "Resources") - ("i" "~/ExoKortex/4-Archives" "Archives") - ("d" "~/Downloads/" "Downloads") - ("u" "/run/media" "Mounted drives") - ("t" "~/.local/share/Trash/files/" "Trash") - )) - (setq dirvish-yank-use-rsync t) - (setq dirvish-yank-rsync-args '("-ah" "--info=progress2")) -) + `(("h" "~/" "Home") + ("e" "~/ExoKortex" "ExoKortex") + ("p" "~/ExoKortex/1-Projects" "Projects") + ("a" "~/ExoKortex/2-Areas" "Areas") + ("r" "~/ExoKortex/3-Resources" "Resources") + ("i" "~/ExoKortex/4-Archives" "Archives") + ("d" "~/Downloads" "Downloads") + ("u" "/run/media/" "Mounted drives") + ("g" "~/.local/share/Trash/files" "Trash"))) + ) ;; Use `p` to open the yank menu (map! :after dirvish-yank :map dirvish-mode-map :n "p" #'dirvish-yank-menu) + +(map! :after dirvish + :leader + :desc "Keep all" "oi" #'dirvish-dwim) #+end_src #+RESULTS: @@ -2036,7 +2070,7 @@ Useful for the user, but also when you have someone over your shoulder trying to (after! org-msg (setq mail-user-agent 'mu4e-user-agent) (require 'org-msg) - (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t" + (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} p:t toc:nil author:nil email:nil \\n:t" org-msg-startup "hidestars indent inlineimages" org-msg-greeting-fmt "\nBonjour%s,\n\n" org-msg-greeting-name-limit 1 @@ -2219,70 +2253,14 @@ Really useful to be able to have a buffer with notes, and another with the offic (pdf-tools-install :no-query) ;; Hooks - (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode) + ;; (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode) (add-hook 'pdf-view-mode-hook #'pdf-view-roll-minor-mode) ) #+end_src -* Custom Emacs-Everywhere for Hyprland +* Custom functions -#+begin_src emacs-lisp -;; Like Emacs everywhere, but work in hyprland -(defun thanos/wtype-text (text) - "Process TEXT for wtype, handling newlines properly." - (let* ((has-final-newline (string-match-p "\n$" text)) - (lines (split-string text "\n")) - (last-idx (1- (length lines)))) - (string-join - (cl-loop for line in lines - for i from 0 - collect (cond - ;; Last line without final newline - ((and (= i last-idx) (not has-final-newline)) - (format "wtype -s 350 \"%s\"" - (replace-regexp-in-string "\"" "\\\\\"" line))) - ;; Any other line - (t - (format "wtype -s 350 \"%s\" && wtype -k Return" - (replace-regexp-in-string "\"" "\\\\\"" line))))) - " && "))) - -(define-minor-mode thanos/type-mode - "Minor mode for inserting text via wtype." - :keymap `((,(kbd "C-c C-c") . ,(lambda () (interactive) - (call-process-shell-command - (thanos/wtype-text (buffer-string)) - nil 0) - (delete-frame))) - (,(kbd "C-c C-k") . ,(lambda () (interactive) - (kill-buffer (current-buffer)))))) - -(defun thanos/type () - "Launch a temporary frame with a clean buffer for typing." - (interactive) - (let ((frame (make-frame '((name . "emacs-float") - (fullscreen . 0) - (undecorated . t) - (width . 70) - (height . 20)))) - (buf (get-buffer-create "emacs-float"))) - (select-frame frame) - (switch-to-buffer buf) - (with-current-buffer buf - (erase-buffer) - (org-mode) - (flyspell-mode) - (thanos/type-mode) - (setq-local header-line-format - (format " %s to insert text or %s to cancel." - (propertize "C-c C-c" 'face 'help-key-binding) - (propertize "C-c C-k" 'face 'help-key-binding))) - ;; Make the frame more temporary-like - (set-frame-parameter frame 'delete-before-kill-buffer t) - (set-window-dedicated-p (selected-window) t)))) -#+end_src - -* Custom function refile to datetree +** Custom function refile to datetree #+begin_src emacs-lisp ;;Refile in datetree function @@ -2314,7 +2292,7 @@ If FILE is nil, refile in the current file." (widen))))) #+end_src -* Custom function ediff org fold +** Custom function ediff org fold #+begin_src emacs-lisp ;; Open all org fold in ediff @@ -2325,7 +2303,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 scheduling +** Custom function for scheduling #+begin_src emacs-lisp ;;; ============================================================ @@ -2774,7 +2752,7 @@ and ensure the standard property drawer exists without overwriting existing data #+RESULTS: : gortium/add-ids-to-subtree -* Custom function for maintenance +** Custom function for maintenance #+begin_src emacs-lisp (after! org ;; --------------------------------------------------------- @@ -2873,7 +2851,7 @@ and ensure the standard property drawer exists without overwriting existing data (add-hook 'org-after-todo-state-change-hook #'my/org-todo-state-handler) #+end_src -* Custom for rescheduling task later +** Custom function for rescheduling task later #+begin_src emacs-lisp (defun my/org-smart-advance-date () "Jump to next repeater occurrence or add 1 day. @@ -2912,7 +2890,7 @@ Suppresses all logging, notes, and custom odometer hooks." :localleader "L" #'my/org-smart-advance-date)) #+end_src -* Custom function Open link in other frame +** Custom function Open link in other frame #+begin_src emacs-lisp ;; Open link in another frame @@ -2928,7 +2906,7 @@ Suppresses all logging, notes, and custom odometer hooks." :n "gF" #'gortium/org-open-link-in-other-frame) #+end_src -* Custom function to open current buffer to new frame +** Custom function to open current buffer to new frame #+begin_src emacs-lisp (defvar gortium/main-frame nil @@ -2999,60 +2977,125 @@ Suppresses all logging, notes, and custom odometer hooks." (delete-window old-win))))))) #+end_src -* Custom function for ExoKortex +** Custom function for ExoKortex #+begin_src emacs-lisp -;; >=== ExoKortex System ===< +;;; ==================================================================== +;;; ExoKortex Core Engine (Shared Logic) +;;; ==================================================================== -(defvar gortium/org-repo-projects "~/ExoKortex/2-Areas/Meta-Planning/Org/Projects" - "Path to your main Org repository where real .org files are stored.") +(defvar gortium/exokortex-root "~/ExoKortex" + "The absolute root directory of your ExoKortex.") -(defvar gortium/projects-root "~/ExoKortex/1-Projects/" - "Root directory where new projects will be created.") +(defun gortium/ensure-node-structure (node-dir &optional default-todo) + "Ensure NODE-DIR conforms to the ExoKortex node blueprint. +Creates folders, writes text-layer filters, and handles Git injection. +Returns the absolute path to the core Org file." + (let* ((node-dir (expand-file-name node-dir)) + (node-name (file-name-nondirectory (directory-file-name node-dir))) + ;; Blueprint Paths + (plan-dir (expand-file-name "1-Plan" node-dir)) + (assets-dir (expand-file-name "2-Assets" node-dir)) + (notes-dir (expand-file-name "3-Notes" node-dir)) + (outputs-dir (expand-file-name "4-Outputs" node-dir)) + (org-file (expand-file-name (concat node-name ".org") plan-dir)) + (gitignore-file (expand-file-name ".gitignore" node-dir)) + (git-existed-p (file-exists-p (expand-file-name ".git" node-dir)))) -(defun gortium/create-project (project-name) - "Create a new project with PROJECT-NAME in `gortium/projects-root`. -The .org file is created in `gortium/org-repo-projects` and symlinked into the project folder." - (interactive "sProject name: ") - (let* ((project-dir (expand-file-name project-name gortium/projects-root)) - (org-file (concat project-name ".org")) - (org-real (expand-file-name org-file gortium/org-repo-projects)) - (org-link (expand-file-name org-file project-dir))) - (make-directory project-dir t) - (unless (file-exists-p org-real) - (with-temp-file org-real - (insert (format "#+TITLE: %s\n#+DATE: %s\n\n" project-name (format-time-string "%Y-%m-%d"))))) - (make-symbolic-link org-real org-link t) - (find-file org-link))) + ;; 1. Build directory layers smoothly (mkdir -p) + (dolist (dir (list plan-dir assets-dir notes-dir outputs-dir)) + (make-directory dir t)) -(defun gortium/create-symlinked-org (file-name) - "Create a symlinked org FILE-NAME in current dir, real file in `gortium/org-repo-projoects`." - (interactive "sOrg file name (without .org): ") - (let* ((org-file (concat file-name ".org")) - (org-real (expand-file-name org-file gortium/org-repo-projects)) - (org-link (expand-file-name org-file default-directory))) - (unless (file-exists-p org-real) - (with-temp-file org-real - (insert (format "#+TITLE: %s\n#+DATE: %s\n\n" file-name (format-time-string "%Y-%m-%d"))))) - (make-symbolic-link org-real org-link t) - (find-file org-link))) + ;; 2. Enforce text-only gitignore rules if absent + (unless (file-exists-p gitignore-file) + (with-temp-file gitignore-file + (insert "# Local Node Rule: Track text layers only\n*\n!.gitignore\n!1-Plan/\n!1-Plan/**\n!3-Notes/\n!3-Notes/**\n"))) -(defun gortium/convert-marked-org-to-symlink () - "Convert all marked org files in Dirvish/Dired to symlinks in `gortium/org-repo-projects`." - (interactive) - (let ((files (dired-get-marked-files))) - (dolist (file-path files) - (when (and (file-regular-p file-path) - (string= (file-name-extension file-path) "org")) - (let* ((file-name (file-name-nondirectory file-path)) - (org-real (expand-file-name file-name gortium/org-repo-projects))) - (unless (file-exists-p org-real) - (rename-file file-path org-real)) - (make-symbolic-link org-real file-path t) - (message "Converted %s to symlink -> %s" file-path org-real)))))) + ;; 3. Build index Org block if absent + (unless (file-exists-p org-file) + (with-temp-file org-file + (insert (format "#+TITLE: %s\n#+DATE: %s\n#+CATEGORY: %s\n\n* Setup\n- [ ] %s\n" + node-name + (format-time-string "[%Y-%m-%d %a]") + node-name + (or default-todo "Initialize project context"))))) + + ;; 4. Unified Git Integration Loop + (let ((default-directory node-dir)) + (if (not git-existed-p) + (progn + (shell-command "git init") + (shell-command "git add .gitignore 1-Plan/ 3-Notes/") + (shell-command "git commit -m 'System: Initialize node repository'")) + (shell-command "git add .gitignore 1-Plan/ 3-Notes/"))) + + ;; Pass the target file location back up to the caller + org-file)) + + +;;; ==================================================================== +;;; Interactive Entry Points +;;; ==================================================================== + +(defun gortium/create-node (category node-name) + "Create a brand new standardized PARA Node inside your ExoKortex vault." + (interactive + (list (completing-read "Category: " '("1-Projects" "2-Areas" "3-Resources")) + (read-string "Node Name: "))) + (let* ((category-dir (expand-file-name category gortium/exokortex-root)) + (node-dir (expand-file-name node-name category-dir)) + (org-file (gortium/ensure-node-structure node-dir "Initialize project context"))) + (find-file org-file) + (message "ExoKortex Node '%s' created in %s." node-name category))) + +(defun gortium/convert-to-node (node-dirs) + "Retrofit existing workspace directories into tracked ExoKortex nodes. +If folders are explicitly marked in Dirvish/Dired, it batch-processes all of them. +Otherwise, prompts for a single directory, defaulting to the item under the cursor." + (interactive + (list + (let* ((dired-elements (when (derived-mode-p 'dired-mode) + (dired-get-marked-files nil nil nil t))) + ;; Dired returns (t . ("path")) if exactly ONE file is marked explicitly, + ;; or a flat list if multiple are marked. + (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) + (and (consp dired-elements) (eq (car dired-elements) t)))) + (marked-dirs (when has-explicit-marks + (cl-remove-if-not #'file-directory-p + (if (eq (car-safe dired-elements) t) + (cdr dired-elements) + dired-elements))))) + (if marked-dirs + marked-dirs + ;; Fallback: No explicit marks found, prompt for a single target + (let* ((cursor-path (when (derived-mode-p 'dired-mode) + (dired-get-filename nil t))) + (initial-path (cond + ((and cursor-path (file-directory-p cursor-path)) + cursor-path) + (cursor-path + (file-name-directory cursor-path)) + (t default-directory)))) + (list (read-directory-name "Directory to convert: " nil initial-path t initial-path))))))) + + ;; Execution Block + (let ((count 0) + last-org-file) + (dolist (dir node-dirs) + (let* ((node-dir (expand-file-name dir)) + (node-name (file-name-nondirectory (directory-file-name node-dir))) + (org-file (gortium/ensure-node-structure node-dir "Audit existing assets and reconcile tracking nodes"))) + (setq last-org-file org-file) + (cl-incf count))) + + ;; Contextual UI Feedback + (if (= count 1) + (progn + (message "Directory successfully converted to ExoKortex node.")) + (message "Successfully batch-converted %d directories to ExoKortex nodes!" count)))) #+end_src -* Custom function to refile task to dailies +** Custom function to refile task to dailies #+begin_src emacs-lisp (defun gortium/refile-to-today-daily () @@ -3116,6 +3159,91 @@ fallback to today's daily note. Ensures the daily has an Org-roam ID." headline (file-name-nondirectory daily-file))))) #+end_src +** Custom function to create a datetree +#+begin_src emacs-lisp +(require 'calendar) + +(defun gortium/org-create-datetree-range () + "Génère une structure datetree Org entre deux dates choisies via le calendrier interactif. +Si la date de début est validée vide, utilise la date d'aujourd'hui." + (interactive) + (let* ((start-time (org-read-date nil t nil "Date de début (Entrée pour aujourd'hui) : ")) + (end-time (org-read-date nil t nil "Date de fin : ")) + (start-decoded (decode-time start-time)) + (end-decoded (decode-time end-time)) + ;; Format attendu par le calendrier Emacs : (mois jour année) + (start-date (list (decoded-time-month start-decoded) + (decoded-time-day start-decoded) + (decoded-time-year start-decoded))) + (end-date (list (decoded-time-month end-decoded) + (decoded-time-day end-decoded) + (decoded-time-year end-decoded))) + (start-abs (calendar-absolute-from-gregorian start-date)) + (end-abs (calendar-absolute-from-gregorian end-date))) + (if (< end-abs start-abs) + (user-error "Erreur : La date de fin doit être après la date de début ! ") + (save-excursion + (cl-loop for abs from start-abs to end-abs + do (org-datetree-find-date-create (calendar-gregorian-from-absolute abs)))) + (message "Datetree généré avec succès !")))) +#+end_src +** Custom Emacs-Everywhere for Hyprland + +#+begin_src emacs-lisp +;; Like Emacs everywhere, but work in hyprland +(defun thanos/wtype-text (text) + "Process TEXT for wtype, handling newlines properly." + (let* ((has-final-newline (string-match-p "\n$" text)) + (lines (split-string text "\n")) + (last-idx (1- (length lines)))) + (string-join + (cl-loop for line in lines + for i from 0 + collect (cond + ;; Last line without final newline + ((and (= i last-idx) (not has-final-newline)) + (format "wtype -s 350 \"%s\"" + (replace-regexp-in-string "\"" "\\\\\"" line))) + ;; Any other line + (t + (format "wtype -s 350 \"%s\" && wtype -k Return" + (replace-regexp-in-string "\"" "\\\\\"" line))))) + " && "))) + +(define-minor-mode thanos/type-mode + "Minor mode for inserting text via wtype." + :keymap `((,(kbd "C-c C-c") . ,(lambda () (interactive) + (call-process-shell-command + (thanos/wtype-text (buffer-string)) + nil 0) + (delete-frame))) + (,(kbd "C-c C-k") . ,(lambda () (interactive) + (kill-buffer (current-buffer)))))) + +(defun thanos/type () + "Launch a temporary frame with a clean buffer for typing." + (interactive) + (let ((frame (make-frame '((name . "emacs-float") + (fullscreen . 0) + (undecorated . t) + (width . 70) + (height . 20)))) + (buf (get-buffer-create "emacs-float"))) + (select-frame frame) + (switch-to-buffer buf) + (with-current-buffer buf + (erase-buffer) + (org-mode) + (flyspell-mode) + (thanos/type-mode) + (setq-local header-line-format + (format " %s to insert text or %s to cancel." + (propertize "C-c C-c" 'face 'help-key-binding) + (propertize "C-c C-k" 'face 'help-key-binding))) + ;; Make the frame more temporary-like + (set-frame-parameter frame 'delete-before-kill-buffer t) + (set-window-dedicated-p (selected-window) t)))) +#+end_src * LifeOS WIP, deactivated for now. diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index 32aa911..069e466 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -44,6 +44,18 @@ evil-prev-buffer evil-next-buffer)) (super-save-mode +1)) +(defvar dotfiles-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/4-Outputs/dotfiles")) + +(defvar roam-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/2-Assets/Roam")) + +(defvar dict-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Home-Infra/2-Assets/Dictionaries")) + +(defvar journal-base-path + (file-name-as-directory "~/ExoKortex/2-Areas/Journal")) + ;; Fixes.. (require 'cl-lib) (unless (fboundp 'find-if) @@ -52,16 +64,20 @@ (defalias 'getf #'cl-getf)) (setq - org-directory "~/ExoKortex/" - +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-directory "~/ExoKortex" + +org-capture-todo-file "~/ExoKortex/inbox.org" + +org-capture-notes-file "~/ExoKortex/inbox.org" + +org-capture-journal-file "~/ExoKortex/inbox.org" + +org-capture-emails-file "~/ExoKortex/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$") ) +(after! org + (setq org-cycle-show-planning-line t) + ) + (after! org (setq org-refile-targets '((nil :maxlevel . 6) ;; Current buffer @@ -343,12 +359,21 @@ ((agenda "" ((org-agenda-span 'month) (org-agenda-start-day nil) - (org-agenda-overriding-header "📅 Sheduled Tasks")) + (org-agenda-overriding-header "📅 Sheduled Tasks") + (org-agenda-time-grid nil) + (org-agenda-prefix-format " %12t") ;; reserve time space + (org-agenda-todo-keyword-format " ") ;; fixed-width TODO + (org-agenda-tags-column -100) ;; right-align tags + (org-agenda-remove-tags t)) ) (todo "TODO|NEXT|DELG|WAIT|HOLD|STRT|IDEA" ((org-agenda-overriding-header "📋 Unscheduled TODOs") (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) + (org-agenda-prefix-format " %12t") ;; reserve time space + (org-agenda-todo-keyword-format " ") ;; fixed-width TODO + (org-agenda-tags-column -100) ;; right-align tags + (org-agenda-remove-tags t) ) ) ) @@ -369,8 +394,8 @@ ) ("wA" "Projet Airbus Vision" ((agenda "" - ((org-agenda-span 150) - (org-agenda-start-day "2026-05-01") + ((org-agenda-span 120) + (org-agenda-start-day "2026-07-01") (org-agenda-overriding-header "📅 Projet Airbus Vision") (org-agenda-prefix-format " %12t") ;; reserve time space (org-agenda-todo-keyword-format " %-5s") ;; fixed-width TODO @@ -521,9 +546,9 @@ (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) (setq org-roam-directory (file-truename "~/ExoKortex/") - org-roam-db-location (file-truename "~/ExoKortex/1-Soma/2-Areas/IT/Roam/org-roam.db") + org-roam-db-location (expand-file-name "org-roam.db" roam-base-path) org-attach-id-dir "assets/" - org-roam-dailies-directory "~/ExoKortex/2-Areas/Meta-Planning/Org/Journal/Daily") + org-roam-dailies-directory (expand-file-name "Daily" journal-base-path)) (after! org-roam org-roam-completion-everywhere t @@ -750,15 +775,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/1-Soma/2-Areas/IT/Dictionaries/perso.dic") + ispell-personal-dictionary (expand-file-name "perso.dic" dict-base-path)) ;; Set the dictionary path environment variable - (setenv "DICPATH" "/home/tpouplier/ExoKortex/1-Soma/2-Areas/IT/Dictionaries") + (setenv "DICPATH" (expand-file-name dict-base-path)) (setq ispell-hunspell-dict-paths-alist - '(("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"))) - + `(("fr_CA" ,(expand-file-name "fr_CA.aff" dict-base-path)) + ("en_CA" ,(expand-file-name "en_CA.aff" dict-base-path)))) (setq ispell-hunspell-dictionary-alist '(("fr_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "fr_CA") nil utf-8) ("en_CA" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_CA") nil utf-8))) @@ -943,11 +967,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/4-Automata/dotfiles/secrets")) + (setq auth-source-passage-filename (expand-file-name "secrets" dotfiles-base-path)) (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/4-Automata/dotfiles/secrets")) + (setenv "PASSAGE_DIR" (expand-file-name "secrets" dotfiles-base-path)) ) (diff-hl-mode +1) @@ -1101,8 +1125,9 @@ DIFF: ;; Dirvish config (after! (dirvish dired) - (require 'async) - (dired-async-mode 1) + ;; Charger l'extension rsync + (require 'dirvish-rsync) + ;; Display icons, file size, timestamps, etc. (setq dirvish-attributes '(nerd-icons @@ -1115,36 +1140,42 @@ DIFF: ;; Use a header line instead of the traditional dired modeline (setq dirvish-use-header-line t) - ;; Show dotfile please, ty - ;; (setq dired-omit-mode nil) - ;; (setq dired-listing-switches "-a") - ;; Replace default dired mode globally (dirvish-override-dired-mode) - (require 'dirvish-yank) + ;; Config rsync (les nouvelles variables) + (setq dirvish-rsync-args '("-ah" "--info=progress2")) + (setq dirvish-rsync-use-yank-menu t) + + ;; Remapper 'y' pour utiliser rsync au lieu du batch Emacs + (setq dirvish-yank-keys + '(("y" "Rsync here" dirvish-rsync) + ("m" "Move here" dirvish-move) + ("s" "Make symlinks here" dirvish-symlink) + ("r" "Make relative symlinks here" dirvish-relative-symlink) + ("h" "Make hardlinks here" dirvish-hardlink))) (setq! dirvish-quick-access-entries - `( - ("h" "~/" "Home") - ("k" "~/ExoKortex/2-Areas/Meta-Planning/Org/Core" "ExoKortex") - ("p" "~/ExoKortex/1-Projects" "Projects") - ("a" "~/ExoKortex/2-Areas" "Areas") - ("r" "~/ExoKortex/3-Resources" "Resources") - ("i" "~/ExoKortex/4-Archives" "Archives") - ("d" "~/Downloads/" "Downloads") - ("u" "/run/media" "Mounted drives") - ("t" "~/.local/share/Trash/files/" "Trash") - )) - (setq dirvish-yank-use-rsync t) - (setq dirvish-yank-rsync-args '("-ah" "--info=progress2")) -) + `(("h" "~/" "Home") + ("e" "~/ExoKortex" "ExoKortex") + ("p" "~/ExoKortex/1-Projects" "Projects") + ("a" "~/ExoKortex/2-Areas" "Areas") + ("r" "~/ExoKortex/3-Resources" "Resources") + ("i" "~/ExoKortex/4-Archives" "Archives") + ("d" "~/Downloads" "Downloads") + ("u" "/run/media/" "Mounted drives") + ("g" "~/.local/share/Trash/files" "Trash"))) + ) ;; Use `p` to open the yank menu (map! :after dirvish-yank :map dirvish-mode-map :n "p" #'dirvish-yank-menu) +(map! :after dirvish + :leader + :desc "Keep all" "oi" #'dirvish-dwim) + ;; Enable previewing of surrounding lines in consult-ripgrep (setq consult-ripgrep-preview t) @@ -1214,7 +1245,7 @@ DIFF: (after! org-msg (setq mail-user-agent 'mu4e-user-agent) (require 'org-msg) - (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t" + (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} p:t toc:nil author:nil email:nil \\n:t" org-msg-startup "hidestars indent inlineimages" org-msg-greeting-fmt "\nBonjour%s,\n\n" org-msg-greeting-name-limit 1 @@ -1361,64 +1392,10 @@ Cordialement, (pdf-tools-install :no-query) ;; Hooks - (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode) + ;; (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode) (add-hook 'pdf-view-mode-hook #'pdf-view-roll-minor-mode) ) -;; Like Emacs everywhere, but work in hyprland -(defun thanos/wtype-text (text) - "Process TEXT for wtype, handling newlines properly." - (let* ((has-final-newline (string-match-p "\n$" text)) - (lines (split-string text "\n")) - (last-idx (1- (length lines)))) - (string-join - (cl-loop for line in lines - for i from 0 - collect (cond - ;; Last line without final newline - ((and (= i last-idx) (not has-final-newline)) - (format "wtype -s 350 \"%s\"" - (replace-regexp-in-string "\"" "\\\\\"" line))) - ;; Any other line - (t - (format "wtype -s 350 \"%s\" && wtype -k Return" - (replace-regexp-in-string "\"" "\\\\\"" line))))) - " && "))) - -(define-minor-mode thanos/type-mode - "Minor mode for inserting text via wtype." - :keymap `((,(kbd "C-c C-c") . ,(lambda () (interactive) - (call-process-shell-command - (thanos/wtype-text (buffer-string)) - nil 0) - (delete-frame))) - (,(kbd "C-c C-k") . ,(lambda () (interactive) - (kill-buffer (current-buffer)))))) - -(defun thanos/type () - "Launch a temporary frame with a clean buffer for typing." - (interactive) - (let ((frame (make-frame '((name . "emacs-float") - (fullscreen . 0) - (undecorated . t) - (width . 70) - (height . 20)))) - (buf (get-buffer-create "emacs-float"))) - (select-frame frame) - (switch-to-buffer buf) - (with-current-buffer buf - (erase-buffer) - (org-mode) - (flyspell-mode) - (thanos/type-mode) - (setq-local header-line-format - (format " %s to insert text or %s to cancel." - (propertize "C-c C-c" 'face 'help-key-binding) - (propertize "C-c C-k" 'face 'help-key-binding))) - ;; Make the frame more temporary-like - (set-frame-parameter frame 'delete-before-kill-buffer t) - (set-window-dedicated-p (selected-window) t)))) - ;;Refile in datetree function (defun org-refile-to-datetree (&optional file) "Refile a subtree to a datetree corresponding to its timestamp. @@ -2108,54 +2085,119 @@ Suppresses all logging, notes, and custom odometer hooks." (when (window-live-p old-win) (delete-window old-win))))))) -;; >=== ExoKortex System ===< +;;; ==================================================================== +;;; ExoKortex Core Engine (Shared Logic) +;;; ==================================================================== -(defvar gortium/org-repo-projects "~/ExoKortex/2-Areas/Meta-Planning/Org/Projects" - "Path to your main Org repository where real .org files are stored.") +(defvar gortium/exokortex-root "~/ExoKortex" + "The absolute root directory of your ExoKortex.") -(defvar gortium/projects-root "~/ExoKortex/1-Projects/" - "Root directory where new projects will be created.") +(defun gortium/ensure-node-structure (node-dir &optional default-todo) + "Ensure NODE-DIR conforms to the ExoKortex node blueprint. +Creates folders, writes text-layer filters, and handles Git injection. +Returns the absolute path to the core Org file." + (let* ((node-dir (expand-file-name node-dir)) + (node-name (file-name-nondirectory (directory-file-name node-dir))) + ;; Blueprint Paths + (plan-dir (expand-file-name "1-Plan" node-dir)) + (assets-dir (expand-file-name "2-Assets" node-dir)) + (notes-dir (expand-file-name "3-Notes" node-dir)) + (outputs-dir (expand-file-name "4-Outputs" node-dir)) + (org-file (expand-file-name (concat node-name ".org") plan-dir)) + (gitignore-file (expand-file-name ".gitignore" node-dir)) + (git-existed-p (file-exists-p (expand-file-name ".git" node-dir)))) -(defun gortium/create-project (project-name) - "Create a new project with PROJECT-NAME in `gortium/projects-root`. -The .org file is created in `gortium/org-repo-projects` and symlinked into the project folder." - (interactive "sProject name: ") - (let* ((project-dir (expand-file-name project-name gortium/projects-root)) - (org-file (concat project-name ".org")) - (org-real (expand-file-name org-file gortium/org-repo-projects)) - (org-link (expand-file-name org-file project-dir))) - (make-directory project-dir t) - (unless (file-exists-p org-real) - (with-temp-file org-real - (insert (format "#+TITLE: %s\n#+DATE: %s\n\n" project-name (format-time-string "%Y-%m-%d"))))) - (make-symbolic-link org-real org-link t) - (find-file org-link))) + ;; 1. Build directory layers smoothly (mkdir -p) + (dolist (dir (list plan-dir assets-dir notes-dir outputs-dir)) + (make-directory dir t)) -(defun gortium/create-symlinked-org (file-name) - "Create a symlinked org FILE-NAME in current dir, real file in `gortium/org-repo-projoects`." - (interactive "sOrg file name (without .org): ") - (let* ((org-file (concat file-name ".org")) - (org-real (expand-file-name org-file gortium/org-repo-projects)) - (org-link (expand-file-name org-file default-directory))) - (unless (file-exists-p org-real) - (with-temp-file org-real - (insert (format "#+TITLE: %s\n#+DATE: %s\n\n" file-name (format-time-string "%Y-%m-%d"))))) - (make-symbolic-link org-real org-link t) - (find-file org-link))) + ;; 2. Enforce text-only gitignore rules if absent + (unless (file-exists-p gitignore-file) + (with-temp-file gitignore-file + (insert "# Local Node Rule: Track text layers only\n*\n!.gitignore\n!1-Plan/\n!1-Plan/**\n!3-Notes/\n!3-Notes/**\n"))) -(defun gortium/convert-marked-org-to-symlink () - "Convert all marked org files in Dirvish/Dired to symlinks in `gortium/org-repo-projects`." - (interactive) - (let ((files (dired-get-marked-files))) - (dolist (file-path files) - (when (and (file-regular-p file-path) - (string= (file-name-extension file-path) "org")) - (let* ((file-name (file-name-nondirectory file-path)) - (org-real (expand-file-name file-name gortium/org-repo-projects))) - (unless (file-exists-p org-real) - (rename-file file-path org-real)) - (make-symbolic-link org-real file-path t) - (message "Converted %s to symlink -> %s" file-path org-real)))))) + ;; 3. Build index Org block if absent + (unless (file-exists-p org-file) + (with-temp-file org-file + (insert (format "#+TITLE: %s\n#+DATE: %s\n#+CATEGORY: %s\n\n* Setup\n- [ ] %s\n" + node-name + (format-time-string "[%Y-%m-%d %a]") + node-name + (or default-todo "Initialize project context"))))) + + ;; 4. Unified Git Integration Loop + (let ((default-directory node-dir)) + (if (not git-existed-p) + (progn + (shell-command "git init") + (shell-command "git add .gitignore 1-Plan/ 3-Notes/") + (shell-command "git commit -m 'System: Initialize node repository'")) + (shell-command "git add .gitignore 1-Plan/ 3-Notes/"))) + + ;; Pass the target file location back up to the caller + org-file)) + + +;;; ==================================================================== +;;; Interactive Entry Points +;;; ==================================================================== + +(defun gortium/create-node (category node-name) + "Create a brand new standardized PARA Node inside your ExoKortex vault." + (interactive + (list (completing-read "Category: " '("1-Projects" "2-Areas" "3-Resources")) + (read-string "Node Name: "))) + (let* ((category-dir (expand-file-name category gortium/exokortex-root)) + (node-dir (expand-file-name node-name category-dir)) + (org-file (gortium/ensure-node-structure node-dir "Initialize project context"))) + (find-file org-file) + (message "ExoKortex Node '%s' created in %s." node-name category))) + +(defun gortium/convert-to-node (node-dirs) + "Retrofit existing workspace directories into tracked ExoKortex nodes. +If folders are explicitly marked in Dirvish/Dired, it batch-processes all of them. +Otherwise, prompts for a single directory, defaulting to the item under the cursor." + (interactive + (list + (let* ((dired-elements (when (derived-mode-p 'dired-mode) + (dired-get-marked-files nil nil nil t))) + ;; Dired returns (t . ("path")) if exactly ONE file is marked explicitly, + ;; or a flat list if multiple are marked. + (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) + (and (consp dired-elements) (eq (car dired-elements) t)))) + (marked-dirs (when has-explicit-marks + (cl-remove-if-not #'file-directory-p + (if (eq (car-safe dired-elements) t) + (cdr dired-elements) + dired-elements))))) + (if marked-dirs + marked-dirs + ;; Fallback: No explicit marks found, prompt for a single target + (let* ((cursor-path (when (derived-mode-p 'dired-mode) + (dired-get-filename nil t))) + (initial-path (cond + ((and cursor-path (file-directory-p cursor-path)) + cursor-path) + (cursor-path + (file-name-directory cursor-path)) + (t default-directory)))) + (list (read-directory-name "Directory to convert: " nil initial-path t initial-path))))))) + + ;; Execution Block + (let ((count 0) + last-org-file) + (dolist (dir node-dirs) + (let* ((node-dir (expand-file-name dir)) + (node-name (file-name-nondirectory (directory-file-name node-dir))) + (org-file (gortium/ensure-node-structure node-dir "Audit existing assets and reconcile tracking nodes"))) + (setq last-org-file org-file) + (cl-incf count))) + + ;; Contextual UI Feedback + (if (= count 1) + (progn + (message "Directory successfully converted to ExoKortex node.")) + (message "Successfully batch-converted %d directories to ExoKortex nodes!" count)))) (defun gortium/refile-to-today-daily () "Refile the current subtree under the 'Journal' headline in today's daily note. @@ -2215,3 +2257,83 @@ fallback to today's daily note. Ensures the daily has an Org-roam ID." (message "Task refiled under '%s' in %s" headline (file-name-nondirectory daily-file))))) + +(require 'calendar) + +(defun gortium/org-create-datetree-range () + "Génère une structure datetree Org entre deux dates choisies via le calendrier interactif. +Si la date de début est validée vide, utilise la date d'aujourd'hui." + (interactive) + (let* ((start-time (org-read-date nil t nil "Date de début (Entrée pour aujourd'hui) : ")) + (end-time (org-read-date nil t nil "Date de fin : ")) + (start-decoded (decode-time start-time)) + (end-decoded (decode-time end-time)) + ;; Format attendu par le calendrier Emacs : (mois jour année) + (start-date (list (decoded-time-month start-decoded) + (decoded-time-day start-decoded) + (decoded-time-year start-decoded))) + (end-date (list (decoded-time-month end-decoded) + (decoded-time-day end-decoded) + (decoded-time-year end-decoded))) + (start-abs (calendar-absolute-from-gregorian start-date)) + (end-abs (calendar-absolute-from-gregorian end-date))) + (if (< end-abs start-abs) + (user-error "Erreur : La date de fin doit être après la date de début ! ") + (save-excursion + (cl-loop for abs from start-abs to end-abs + do (org-datetree-find-date-create (calendar-gregorian-from-absolute abs)))) + (message "Datetree généré avec succès !")))) + +;; Like Emacs everywhere, but work in hyprland +(defun thanos/wtype-text (text) + "Process TEXT for wtype, handling newlines properly." + (let* ((has-final-newline (string-match-p "\n$" text)) + (lines (split-string text "\n")) + (last-idx (1- (length lines)))) + (string-join + (cl-loop for line in lines + for i from 0 + collect (cond + ;; Last line without final newline + ((and (= i last-idx) (not has-final-newline)) + (format "wtype -s 350 \"%s\"" + (replace-regexp-in-string "\"" "\\\\\"" line))) + ;; Any other line + (t + (format "wtype -s 350 \"%s\" && wtype -k Return" + (replace-regexp-in-string "\"" "\\\\\"" line))))) + " && "))) + +(define-minor-mode thanos/type-mode + "Minor mode for inserting text via wtype." + :keymap `((,(kbd "C-c C-c") . ,(lambda () (interactive) + (call-process-shell-command + (thanos/wtype-text (buffer-string)) + nil 0) + (delete-frame))) + (,(kbd "C-c C-k") . ,(lambda () (interactive) + (kill-buffer (current-buffer)))))) + +(defun thanos/type () + "Launch a temporary frame with a clean buffer for typing." + (interactive) + (let ((frame (make-frame '((name . "emacs-float") + (fullscreen . 0) + (undecorated . t) + (width . 70) + (height . 20)))) + (buf (get-buffer-create "emacs-float"))) + (select-frame frame) + (switch-to-buffer buf) + (with-current-buffer buf + (erase-buffer) + (org-mode) + (flyspell-mode) + (thanos/type-mode) + (setq-local header-line-format + (format " %s to insert text or %s to cancel." + (propertize "C-c C-c" 'face 'help-key-binding) + (propertize "C-c C-k" 'face 'help-key-binding))) + ;; Make the frame more temporary-like + (set-frame-parameter frame 'delete-before-kill-buffer t) + (set-window-dedicated-p (selected-window) t)))) diff --git a/doom/.config/doom/flycheck_init.el b/doom/.config/doom/flycheck_init.el new file mode 100644 index 0000000..0136f24 --- /dev/null +++ b/doom/.config/doom/flycheck_init.el @@ -0,0 +1,211 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + ;;company ; the ultimate code completion backend + (corfu +orderless) ; complete with cap(f), cape and a flying feather! + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + ;;treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + (vc-gutter +pretty) ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + zen ; distraction-free coding or writing + + :editor + (evil +everywhere + +numbers); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + (dired +dirvish +icons) ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + eww ; the internet is gross + + (ibuffer +icons) ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (spell +flyspell) ; tasing you for misspelling mispelling + grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends + debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + lookup ; navigate your code and its documentation + (lsp +peek) ; M-x vscode + magit ; a git porcelain for Emacs + make ; run make tasks from Emacs + ;;pass ; password manager for nerds + pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;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 + + :os + (:if (featurep :system 'macos) macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + beancount ; mind the GAAP + (cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + (csharp +lsp +tree-sitter) ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST + (haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + json ; At least it ain't XML + (java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ledger ; be audit you can be + lua ; one-based indices? one-based indices + (markdown ; writing docs for people to ignore + +grip + +tree-sitter) + ;;nim ; python + lisp at the speed of c + (nix ; I hereby declare "nix geht mehr!" + +lsp + +tree-sitter) + ;;ocaml ; an objective camel + (org ; organize your plain life in plain text + +dragndrop + +pretty + +journal + +present + +roam + +pandoc + +noter) + ;;php ; perl's insecure younger brother + plantuml ; diagrams for confusing people more + ;;graphviz ; diagrams for confusing yourself even more + ;;purescript ; javascript, but functional + (python + +lsp + +pyright + +cython) ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + (sh ; she sells {ba,z,fi}sh shells on the C xor + +lsp + +powershell) + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + (mu4e +org +gmail +mbsync) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;emms ; Multimedia system + everywhere ; *leave* Emacs!? You must be joking + irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/doom/.config/doom/init.el b/doom/.config/doom/init.el index 45e82c4..0136f24 100644 --- a/doom/.config/doom/init.el +++ b/doom/.config/doom/init.el @@ -31,7 +31,7 @@ :ui ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs + dashboard ; a nifty splash screen for Emacs ;;doom-quit ; DOOM quit-message prompts when you quit Emacs (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW @@ -68,7 +68,7 @@ ;;word-wrap ; soft wrapping with language-aware indent :emacs - (dired +dirvish + icons) ; making dired pretty [functional] + (dired +dirvish +icons) ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent eww ; the internet is gross @@ -163,7 +163,7 @@ +pretty +journal +present - +roam2 + +roam +pandoc +noter) ;;php ; perl's insecure younger brother diff --git a/doom/.config/doom/packages.el b/doom/.config/doom/packages.el index a890e3c..084a4b4 100644 --- a/doom/.config/doom/packages.el +++ b/doom/.config/doom/packages.el @@ -135,11 +135,13 @@ (package! passage :recipe (:host github :repo "anticomputer/passage.el" :protocol ssh)) -;; Server is down, deactivated for now ;; (package! krl-mode ;; :recipe (:host nil ;; :repo "ssh://code.lazyworkhorse.net:2222/gortium/krl-mode.git" ;; :files ("*.el"))) +(package! krl-mode + :recipe (:local-repo "/home/tpouplier/ExoKortex/3-Resources/krl-mode" + :files ("*.el"))) (package! auto-highlight-symbol) diff --git a/exokortex/.config/systemd/user/exokortex_auto_commit.service b/exokortex/.config/systemd/user/exokortex_auto_commit.service new file mode 100644 index 0000000..2b4c1c9 --- /dev/null +++ b/exokortex/.config/systemd/user/exokortex_auto_commit.service @@ -0,0 +1,10 @@ +[Unit] +Description=Automated ExoKortex PARA Node Git Sweep +Documentation=https://github.com/gortium + +[Service] +Type=oneshot +ExecStart=%h/.local/bin/exokortex_auto_commit.sh + +[Install] +WantedBy=default.target diff --git a/exokortex/.config/systemd/user/exokortex_auto_commit.timer b/exokortex/.config/systemd/user/exokortex_auto_commit.timer new file mode 100644 index 0000000..865c76a --- /dev/null +++ b/exokortex/.config/systemd/user/exokortex_auto_commit.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run Automated ExoKortex Sweep Hourly + +[Timer] +OnCalendar=hourly +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/exokortex/.local/bin/exokortex_auto_commit.sh b/exokortex/.local/bin/exokortex_auto_commit.sh new file mode 100755 index 0000000..f75d466 --- /dev/null +++ b/exokortex/.local/bin/exokortex_auto_commit.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# ============================================================================== +# PARA TARGET CONTROLS +# Comment out (#) any directory to completely deactivate it from the sweep. +# ============================================================================== +TARGETS=( + "$HOME/ExoKortex/1-Projects" + "$HOME/ExoKortex/2-Areas" + # "$HOME/ExoKortex/3-Resources" + # "$HOME/ExoKortex/4-Archives/" +) + +# Protect against empty arrays if all targets get disabled +if [ ${#TARGETS[@]} -eq 0 ]; then + echo "Drop execution: No active PARA targets configured." + exit 0 +fi + +# Execute strict structural scanning on active paths only +find "${TARGETS[@]}" -mindepth 2 -maxdepth 2 -type d -name ".git" | while read -r gitdir; do + repo_dir=$(dirname "$gitdir") + cd "$repo_dir" + + if [ -n "$(git status --porcelain)" ]; then + git add . + git commit -m "System: Automated background sweep $(date +'%Y-%m-%d %H:%M')" + fi +done diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf index 9684de1..28c18b7 100755 --- a/hypr/.config/hypr/hyprland.conf +++ b/hypr/.config/hypr/hyprland.conf @@ -24,22 +24,32 @@ $EXTERNAL_R2=DP-7 # See https://wiki.hyprland.org/Configuring/Monitors/ # Useful command: # hyprctl monitors all + ## Valkyrie setup # monitor=eDP-1,highres,auto,2 #3200x1800,0x0,2 # monitor=HDMI-A-2,2560x1600,auto,1 #1600x0,1 #x-370,1,transform,1 + ## Ingenuity setup monitor=$LAPTOP, 1920x1080, 0x0, 1 monitor=DP-3, 1920x1080, 1920x0, 1 # HDMI screen + # Horizontal setup #monitor=DP-4,1920x1080,-960x-1080,1 # Left screen #monitor=DP-6,1920x1080,-960x-1080,1 # Left screen #monitor=DP-5,1920x1080,960x-1080,1 # Right screen #monitor=DP-7,1920x1080,960x-1080,1 # Right screen + # Vertical setup -monitor=$EXTERNAL_L1, 1920x1080, 0x-1080, 1, transform, 0 # Left screen -monitor=$EXTERNAL_L2, 1920x1080,0x-1080,1,transform,0 # Left screen +# monitor=$EXTERNAL_L1, 1920x1080, 0x-1080, 1, transform, 0 # Left screen +# monitor=$EXTERNAL_L2, 1920x1080,0x-1080,1,transform,0 # Left screen +# monitor=$EXTERNAL_R1, 1920x1080, 1920x-1480, 1, transform, 1 # Right screen +# monitor=$EXTERNAL_R2, 1920x1080,1920x-1480,1,transform,1 # Right screen + +# Double Vertical setup +monitor=$EXTERNAL_L1, 1920x1080, -1080x-1480, 1, transform, 3 # Left screen +monitor=$EXTERNAL_L2, 1920x1080, -1080x-1480, 1, transform, 3 # Left screen monitor=$EXTERNAL_R1, 1920x1080, 1920x-1480, 1, transform, 1 # Right screen -monitor=$EXTERNAL_R2, 1920x1080,1920x-1480,1,transform,1 # Right screen +monitor=$EXTERNAL_R2, 1920x1080, 1920x-1480, 1, transform, 1 # Right screen ################### ### MY PROGRAMS ### @@ -64,20 +74,17 @@ $monitoring = kitty btop # exec-once = $terminal # exec-once = nm-applet & +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE exec = hyprshade auto exec-once = udiskie exec-once = waybar -exec-once = swww-daemon -exec-once = swww img ~/.config/wallpapers/green_yellow_forest.jpg --outputs $LAPTOP -exec-once = swww img ~/.config/wallpapers/green_yellow_forest.jpg --outputs $EXTERNAL_L1 -exec-once = swww img ~/.config/wallpapers/green_yellow_forest.jpg --outputs $EXTERNAL_L2 -exec-once = swww img ~/.config/wallpapers/buck_head.jpg --outputs $EXTERNAL_R1 -exec-once = swww img ~/.config/wallpapers/buck_head.jpg --outputs $EXTERNAL_R2 exec-once = swaync exec-once = hypridle exec-once = hyprlock exec-once = /usr/bin/emacs --daemon -exec-once = dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE +exec-once = swww-daemon +exec-once = sleep 1 && swww img ~/.config/wallpapers/green_yellow_forest.jpg --outputs $LAPTOP,$EXTERNAL_L1,$EXTERNAL_L2 +exec-once = sleep 1 && swww img ~/.config/wallpapers/buck_head.jpg --outputs $EXTERNAL_R1,$EXTERNAL_R2 ############################# ### ENVIRONMENT VARIABLES ### @@ -210,12 +217,13 @@ device { # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier +$dotfiles = ~/ExoKortex/2-Areas/Home-Infra/4-Outputs/dotfiles # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, T, exec, $terminal bind = $mainMod, D, killactive, bind = $mainMod SHIFT, Q, exit, -bind = $mainMod, U, exec, ~/ExoKortex/4-Automata/dotfiles/scripts/make_all.sh +bind = $mainMod, U, exec, $dotfiles/scripts/make_all.sh && swww img ~/.config/wallpapers/green_yellow_forest.jpg --outputs $LAPTOP,$EXTERNAL_L1,$EXTERNAL_L2 && swww img ~/.config/wallpapers/buck_head.jpg --outputs $EXTERNAL_R1,$EXTERNAL_R2 bind = $mainMod, M, exec, $monitoring bind = $mainMod, E, exec, $editor bind = $mainMod, V, togglefloating, @@ -226,7 +234,8 @@ 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/4-Automata/recordntrans/record_transcribe.py +bind = $mainMod, B, exec, python $dotfiles/recordntrans/record_transcribe.py +bind = $mainMod, i, exec, $dotfiles/scripts/scrot-ocr.sh # bind = $mainMod, G, exec, nerd-dictation end bind = $mainMod, A, exec, $music bind = $mainMod, C, exec, emacsclient -n -c -e '(gortium/hermes-vterm)' diff --git a/hypr/.config/hypr/hyprlock.conf b/hypr/.config/hypr/hyprlock.conf index 851ac12..1e65c64 100644 --- a/hypr/.config/hypr/hyprlock.conf +++ b/hypr/.config/hypr/hyprlock.conf @@ -1,7 +1,7 @@ source = $HOME/.cache/wal/colors-hyprland.conf general { - ignore_empty_input = true +# ignore_empty_input = true } background { diff --git a/rclone/.config/systemd/user/rclone_ftp_mount.service b/rclone/.config/systemd/user/rclone_ftp_mount.service index 0b6ea9a..d0728f6 100644 --- a/rclone/.config/systemd/user/rclone_ftp_mount.service +++ b/rclone/.config/systemd/user/rclone_ftp_mount.service @@ -5,11 +5,21 @@ Wants=network-online.target [Service] Type=simple -# Use Environment to explicitly set $HOME Environment=HOME=%h ExecStartPre=%h/.local/bin/rclone_mount_check.sh -ExecStart=/usr/bin/rclone mount tdnde_ftp: %h/mnt/tdnde_server --vfs-cache-mode full --vfs-cache-max-size 1G --ftp-concurrency 20 --timeout 60s --contimeout 30s --dir-cache-time 1h -ExecStop=/bin/fusermount -u %h/mnt/tdnde_server +ExecStartPre=-/bin/fusermount -uz %h/mnt/tdnde_server +ExecStart=/usr/bin/rclone mount tdnde_ftp: %h/mnt/tdnde_server \ + --vfs-cache-mode full \ + --vfs-cache-max-size 4G \ + --vfs-read-chunk-size 4M \ + --vfs-read-chunk-size-limit 128M \ + --buffer-size 32M \ + --ftp-concurrency 20 \ + --timeout 300s \ + --contimeout 60s \ + --dir-cache-time 1h +ExecStop=/bin/fusermount -uz %h/mnt/tdnde_server +ExecStopPost=/bin/fusermount -uz %h/mnt/tdnde_server Restart=on-failure [Install] diff --git a/scripts/exokortex_post_install.sh b/scripts/exokortex_post_install.sh new file mode 100644 index 0000000..6b91fc1 --- /dev/null +++ b/scripts/exokortex_post_install.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Define paths +SWEEP_SCRIPT="$HOME/.local/bin/exokortex_auto_commit.sh" +TIMER_FILE="$HOME/.config/systemd/user/exokortex_auto_commit.timer" + +# Ensure the sweeper script is executable +if [ -f "$SWEEP_SCRIPT" ] && [ ! -x "$SWEEP_SCRIPT" ]; then + echo "Making the exokortex sweep script executable: $SWEEP_SCRIPT" + chmod +x "$SWEEP_SCRIPT" || { echo "Failed to make the script executable"; exit 1; } +else + echo "Sweep script already executable or doesn't exist yet." +fi + +# Reload user systemd to recognize the new units +systemctl --user daemon-reload + +# Enable and start the timer if the configuration file is in place +if [ -f "$TIMER_FILE" ]; then + if ! systemctl --user is-enabled --quiet exokortex_auto_commit.timer; then + echo "Enabling the exokortex_auto_commit timer." + systemctl --user enable exokortex_auto_commit.timer || { echo "Failed to enable the timer"; exit 1; } + else + echo "Exokortex timer already enabled." + fi +else + echo "Timer file does not exist at $TIMER_FILE." + exit 1 +fi + +# Start the timer if it is not currently ticking +if systemctl --user is-active --quiet exokortex_auto_commit.timer; then + echo "exokortex_auto_commit timer is already running." +else + echo "Starting the exokortex_auto_commit timer." + systemctl --user start exokortex_auto_commit.timer || echo "Warning: ExoKortex timer failed to start, skipping..." +fi + +echo "Post-installation steps for exokortex completed." diff --git a/scripts/make_all.sh b/scripts/make_all.sh index 0dbca8c..caaba2b 100755 --- a/scripts/make_all.sh +++ b/scripts/make_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd ~/ExoKortex/4-Automata/dotfiles/ +cd ~/ExoKortex/2-Areas/Home-Infra/4-Outputs/dotfiles make all if [ $? -eq 0 ]; then notify-send "Dotfiles" "Configuration reloaded successfully!" diff --git a/scripts/rclone_post_install.sh b/scripts/rclone_post_install.sh index bf6f9ba..11051d7 100644 --- a/scripts/rclone_post_install.sh +++ b/scripts/rclone_post_install.sh @@ -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 --user start rclone_ftp_mount.service || { echo "Failed to start the service"; exit 1; } + systemctl --user start rclone_ftp_mount.service || echo "Warning: Rclone service failed to start, skipping..." fi -echo "Post-installation steps for rclone completed successfully." +echo "Post-installation steps for rclone completed." diff --git a/zsh/.zshrc b/zsh/.zshrc index b62d151..21fedd6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -67,6 +67,9 @@ function yy() { rm -f -- "$tmp" } +# dua +alias dua="dua i" + # Nvim export LANG=en_CA.UTF-8 export LC_ALL=en_CA.UTF-8 @@ -76,7 +79,7 @@ export EDITOR="nvim" source <(fzf --zsh) # Capitalization fixing in tab completion -autoload -Uz compinit && compinit +autoload -Uz compinit && compinit -u zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Bat @@ -165,3 +168,6 @@ export HYPRSHOT_DIR="Images" # Created by `pipx` on 2026-03-03 16:51:31 export PATH="$PATH:/home/tpouplier/.local/bin" + +# autosuggestions +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh