1
0
Fork 0

Compare commits

..

No commits in common. "655ce45b2f4f8ebcc0e1937e1a362228022dd95d" and "d746c11739dd1814ce82f134adffa4d172d8e16c" have entirely different histories.

3 changed files with 50 additions and 80 deletions

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2023.0911.210534
;; Version: 2023.0814.145257
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
;; This program is free software; you can redistribute it and/or modify
@ -123,15 +123,6 @@ _s_: String list"
(region-beginning)
(region-end))))
(defhydra oni-core-applications-hydra (:color teal :hint nil)
"
^^^Applications^^^
^^--------------------^^-----------------^^--------------
_m_: Email (notmuch) _r_: RSS (elfeed) _i_: IRC (circe) "
("m" notmuch)
("r" elfeed)
("i" circe))
(add-to-list 'auto-save-file-name-transforms
`(".*" ,oni-core--auto-save-directory t)
:append)
@ -203,7 +194,6 @@ _s_: String list"
(global-set-key (kbd "C-c (") '("Embrace Commander" . embrace-commander))
(global-set-key (kbd "C-c q") '("Unfill Paragraph" . oni-core-unfill-paragraph))
(global-set-key (kbd "C-c s") '("Sort and Align Commands" . oni-sort-and-align-hydra/body))
(global-set-key (kbd "C-c a") '("Applications" . oni-core-applications-hydra/body))
(global-set-key (kbd "C-c l") 'imenu)
(global-set-key (kbd "C-x C-b") '("List Buffers" . ibuffer-jump))
(global-set-key (kbd "C-x M-f") 'ffap)
@ -527,23 +517,5 @@ which normally have their errors suppressed."
(when (treesit-available-p)
(add-to-list 'interpreter-mode-alist '("bash" . bash-ts-mode)))
(defun oni-core-copy-guix-build-hash ()
"Try and find the last actual hash in the compilation buffer and insert it."
(interactive)
(insert
(with-current-buffer compilation-last-buffer
(save-excursion
(save-match-data
(goto-char (point-max))
(re-search-backward (rx bol (zero-or-more whitespace) "actual hash:" (one-or-more whitespace)))
(goto-char (match-end 0))
(buffer-substring-no-properties (point) (line-end-position)))))))
(if (boundp 'safe-local-variable-directories)
(setq safe-local-variable-directories
(cl-delete-if
(lambda (d) (string-match-p (rx "/" (or "." ".." "foreign") eos) d))
(directory-files "~/projects/" t))))
(provide 'oni-core)
;;; oni-core.el ends here

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2023.0911.210345
;; Version: 2023.0822.170151
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-bullets org-edna diminish all-the-icons olivetti form-feed org-pretty-table ob-async)
;; This program is free software; you can redistribute it and/or modify
@ -40,6 +40,7 @@
(require 'hydra)
(require 'ob)
(require 'ob-async)
;; (require 'ol-man)
(require 'org)
(require 'org-clock)
(require 'org-edna)
@ -47,7 +48,6 @@
(require 'org-faces)
(require 'org-habit)
(require 'org-protocol)
(require 'org-roam)
(require 'subr-x)
(require 'yasnippet)
@ -568,57 +568,52 @@ also move point to the start of the heading."
(defun oni-org-set-agenda-category-icons ()
"Set org-agenda-category-icon-alist."
(setq org-agenda-category-icon-alist
(mapcar (lambda (pair) (list (rx string-start (literal (car pair)) string-end)
(expand-file-name (cdr pair) oni-org-icons-dir)
'svg nil
:height (window-default-font-height)
:ascent 'center))
'(("task" . "bx-task.svg")
("inbox" . "bxs-inbox.svg")
("email" . "mat-email.svg")
("mail" . "mat-email.svg")
("life" . "mat-one-up.svg")
("feature" . "mat-star-circle-outline.svg")
("work" . "bs-building.svg")
("game" . "bxs-game.svg")
("shopping" . "bx-shopping-bag.svg")
("bug" . "bx-bug.svg")
("idea" . "bxs-bulb.svg")
("article" . "mat-post-outline.svg")
("project" . "bs-kanban.svg")
("ebook" . "bxs-book-content.svg")
("book" . "mat-book-open-variant.svg")
("Morning Cup of Coding" . "bxs-coffee.svg")
("paper" . "mat-note-text-outline.svg")
("question" . "mat-head-question.svg")
("music" . "bxs-music.svg")
("emacs" . "emacs.svg")
("guix" . "guix.svg")
("moving" . "bxs-truck.svg")
("security" . "mat-security.svg")
("website" . "mat-web.svg")
("desktop" . "bx-desktop.svg")
("maint" . "bs-tools.svg")
("comm" . "bs-telephone-fill.svg")
("config" . "bx-cog.svg")
("blog" . "bx-rss.svg")
("writing" . "bxs-pencil.svg")
("code" . "code.svg")
("list" . "list.svg")
("video" . "video-fill.svg")
("album" . "album-fill.svg")))))
(defun oni-org-roam-todo-files ()
"Collect all files that have TODO items in them."
(mapcar
#'car
(org-roam-db-query
[:select :distinct file :from nodes :where (= todo $s1)] "TODO")))
(let* ((icon-height (window-default-font-height))
(defaults `(nil :height ,icon-height :ascent center))
(svg `(svg ,@defaults)))
(setq org-agenda-category-icon-alist
`((,(rx string-start "task" string-end) ,(expand-file-name "bx-task.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "inbox" string-end) ,(expand-file-name "bxs-inbox.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "email" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "mail" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "life" string-end) ,(expand-file-name "mat-one-up.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "feature" string-end) ,(expand-file-name "mat-star-circle-outline.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "work" string-end) ,(expand-file-name "bs-building.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "game" string-end) ,(expand-file-name "bxs-game.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "shopping" string-end) ,(expand-file-name "bx-shopping-bag.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "bug" string-end) ,(expand-file-name "bx-bug.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "idea" string-end) ,(expand-file-name "bxs-bulb.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "article" string-end) ,(expand-file-name "mat-post-outline.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "project" string-end) ,(expand-file-name "bs-kanban.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "ebook" string-end) ,(expand-file-name "bxs-book-content.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "book" string-end) ,(expand-file-name "mat-book-open-variant.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "Morning Cup of Coding" string-end) ,(expand-file-name "bxs-coffee.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "paper" string-end) ,(expand-file-name "mat-note-text-outline.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "question" string-end) ,(expand-file-name "mat-head-question.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "music" string-end) ,(expand-file-name "bxs-music.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "emacs" string-end) ,(expand-file-name "emacs.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "guix" string-end) ,(expand-file-name "guix.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "moving" string-end) ,(expand-file-name "bxs-truck.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "security" string-end) ,(expand-file-name "mat-security.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "website" string-end) ,(expand-file-name "mat-web.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "desktop" string-end) ,(expand-file-name "bx-desktop.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "maint" string-end) ,(expand-file-name "bs-tools.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "comm" string-end) ,(expand-file-name "bs-telephone-fill.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "config" string-end) ,(expand-file-name "bx-cog.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "blog" string-end) ,(expand-file-name "bx-rss.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "writing" string-end) ,(expand-file-name "bxs-pencil.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "code" string-end) ,(expand-file-name "code.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "list" string-end) ,(expand-file-name "list.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "video" string-end) ,(expand-file-name "video-fill.svg" oni-org-icons-dir) ,@svg)
(,(rx string-start "album" string-end) ,(expand-file-name "album-fill.svg" oni-org-icons-dir) ,@svg)))))
(setq org-agenda-files
(cons oni-org-todo-main-file
(oni-org-roam-todo-files)))
(mapcar (lambda (file) (expand-file-name file oni-org-exocortex-directory))
(split-string
(let ((default-directory oni-org-exocortex-directory))
(shell-command-to-string "grep -E -l \"^\\\\*+ (TODO|WIP|BLOCKED|DONE|READ|READING|FINISHED|STOPPED|WATCH|WATCHING|WATCHED|LISTEN|LISTENING|CANCELLED)\" *.org"))
"\n" t))))
(setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-restore-windows-after-quit t)

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2023.0911.203005
;; Version: 2022.0301.235907
;; Package-Requires: (projectile oni-data-dir)
;; This program is free software; you can redistribute it and/or modify
@ -48,5 +48,8 @@
(setq projectile-generic-command "\"C:\\msys64\\usr\\bin\\find.exe\" . -type d \"(\" -path \"*/node_modules\" -o -path \"*/upload-test\" -o -path \"*/dlls\" -o -path \"*/apps/*/img\" -o -path \"*/apps/*/video\" -o -path \"*/apps/*/font\" -o -path \"*/apps/*/content\" -o -path \"*/apps/*/favicons\" -o -path \"*/apps/*/pages.*\" -o -path \"*/.intl\" \")\" -prune -o -type f -print0")
(setq projectile-indexing-method 'alien))
;;;###autoload
(projectile-mode)
(provide 'oni-projectile)
;;; oni-projectile.el ends here