Compare commits
6 commits
d746c11739
...
655ce45b2f
Author | SHA1 | Date | |
---|---|---|---|
655ce45b2f | |||
e2a8115ba8 | |||
120bf9048f | |||
e1c791f6fd | |||
5391e2cb31 | |||
0d95800422 |
3 changed files with 80 additions and 50 deletions
30
oni-core.el
30
oni-core.el
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0814.145257
|
;; Version: 2023.0911.210534
|
||||||
;; 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)
|
;; 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
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -123,6 +123,15 @@ _s_: String list"
|
||||||
(region-beginning)
|
(region-beginning)
|
||||||
(region-end))))
|
(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
|
(add-to-list 'auto-save-file-name-transforms
|
||||||
`(".*" ,oni-core--auto-save-directory t)
|
`(".*" ,oni-core--auto-save-directory t)
|
||||||
:append)
|
:append)
|
||||||
|
@ -194,6 +203,7 @@ _s_: String list"
|
||||||
(global-set-key (kbd "C-c (") '("Embrace Commander" . embrace-commander))
|
(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 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 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-c l") 'imenu)
|
||||||
(global-set-key (kbd "C-x C-b") '("List Buffers" . ibuffer-jump))
|
(global-set-key (kbd "C-x C-b") '("List Buffers" . ibuffer-jump))
|
||||||
(global-set-key (kbd "C-x M-f") 'ffap)
|
(global-set-key (kbd "C-x M-f") 'ffap)
|
||||||
|
@ -517,5 +527,23 @@ which normally have their errors suppressed."
|
||||||
(when (treesit-available-p)
|
(when (treesit-available-p)
|
||||||
(add-to-list 'interpreter-mode-alist '("bash" . bash-ts-mode)))
|
(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)
|
(provide 'oni-core)
|
||||||
;;; oni-core.el ends here
|
;;; oni-core.el ends here
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0822.170151
|
;; Version: 2023.0911.210345
|
||||||
;; 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)
|
;; 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
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -40,7 +40,6 @@
|
||||||
(require 'hydra)
|
(require 'hydra)
|
||||||
(require 'ob)
|
(require 'ob)
|
||||||
(require 'ob-async)
|
(require 'ob-async)
|
||||||
;; (require 'ol-man)
|
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(require 'org-clock)
|
(require 'org-clock)
|
||||||
(require 'org-edna)
|
(require 'org-edna)
|
||||||
|
@ -48,6 +47,7 @@
|
||||||
(require 'org-faces)
|
(require 'org-faces)
|
||||||
(require 'org-habit)
|
(require 'org-habit)
|
||||||
(require 'org-protocol)
|
(require 'org-protocol)
|
||||||
|
(require 'org-roam)
|
||||||
(require 'subr-x)
|
(require 'subr-x)
|
||||||
(require 'yasnippet)
|
(require 'yasnippet)
|
||||||
|
|
||||||
|
@ -568,52 +568,57 @@ also move point to the start of the heading."
|
||||||
|
|
||||||
(defun oni-org-set-agenda-category-icons ()
|
(defun oni-org-set-agenda-category-icons ()
|
||||||
"Set ‘org-agenda-category-icon-alist’."
|
"Set ‘org-agenda-category-icon-alist’."
|
||||||
(let* ((icon-height (window-default-font-height))
|
|
||||||
(defaults `(nil :height ,icon-height :ascent center))
|
|
||||||
(svg `(svg ,@defaults)))
|
|
||||||
(setq org-agenda-category-icon-alist
|
(setq org-agenda-category-icon-alist
|
||||||
`((,(rx string-start "task" string-end) ,(expand-file-name "bx-task.svg" oni-org-icons-dir) ,@svg)
|
(mapcar (lambda (pair) (list (rx string-start (literal (car pair)) string-end)
|
||||||
(,(rx string-start "inbox" string-end) ,(expand-file-name "bxs-inbox.svg" oni-org-icons-dir) ,@svg)
|
(expand-file-name (cdr pair) oni-org-icons-dir)
|
||||||
(,(rx string-start "email" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg)
|
'svg nil
|
||||||
(,(rx string-start "mail" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg)
|
:height (window-default-font-height)
|
||||||
(,(rx string-start "life" string-end) ,(expand-file-name "mat-one-up.svg" oni-org-icons-dir) ,@svg)
|
:ascent 'center))
|
||||||
(,(rx string-start "feature" string-end) ,(expand-file-name "mat-star-circle-outline.svg" oni-org-icons-dir) ,@svg)
|
'(("task" . "bx-task.svg")
|
||||||
(,(rx string-start "work" string-end) ,(expand-file-name "bs-building.svg" oni-org-icons-dir) ,@svg)
|
("inbox" . "bxs-inbox.svg")
|
||||||
(,(rx string-start "game" string-end) ,(expand-file-name "bxs-game.svg" oni-org-icons-dir) ,@svg)
|
("email" . "mat-email.svg")
|
||||||
(,(rx string-start "shopping" string-end) ,(expand-file-name "bx-shopping-bag.svg" oni-org-icons-dir) ,@svg)
|
("mail" . "mat-email.svg")
|
||||||
(,(rx string-start "bug" string-end) ,(expand-file-name "bx-bug.svg" oni-org-icons-dir) ,@svg)
|
("life" . "mat-one-up.svg")
|
||||||
(,(rx string-start "idea" string-end) ,(expand-file-name "bxs-bulb.svg" oni-org-icons-dir) ,@svg)
|
("feature" . "mat-star-circle-outline.svg")
|
||||||
(,(rx string-start "article" string-end) ,(expand-file-name "mat-post-outline.svg" oni-org-icons-dir) ,@svg)
|
("work" . "bs-building.svg")
|
||||||
(,(rx string-start "project" string-end) ,(expand-file-name "bs-kanban.svg" oni-org-icons-dir) ,@svg)
|
("game" . "bxs-game.svg")
|
||||||
(,(rx string-start "ebook" string-end) ,(expand-file-name "bxs-book-content.svg" oni-org-icons-dir) ,@svg)
|
("shopping" . "bx-shopping-bag.svg")
|
||||||
(,(rx string-start "book" string-end) ,(expand-file-name "mat-book-open-variant.svg" oni-org-icons-dir) ,@svg)
|
("bug" . "bx-bug.svg")
|
||||||
(,(rx string-start "Morning Cup of Coding" string-end) ,(expand-file-name "bxs-coffee.svg" oni-org-icons-dir) ,@svg)
|
("idea" . "bxs-bulb.svg")
|
||||||
(,(rx string-start "paper" string-end) ,(expand-file-name "mat-note-text-outline.svg" oni-org-icons-dir) ,@svg)
|
("article" . "mat-post-outline.svg")
|
||||||
(,(rx string-start "question" string-end) ,(expand-file-name "mat-head-question.svg" oni-org-icons-dir) ,@svg)
|
("project" . "bs-kanban.svg")
|
||||||
(,(rx string-start "music" string-end) ,(expand-file-name "bxs-music.svg" oni-org-icons-dir) ,@svg)
|
("ebook" . "bxs-book-content.svg")
|
||||||
(,(rx string-start "emacs" string-end) ,(expand-file-name "emacs.svg" oni-org-icons-dir) ,@svg)
|
("book" . "mat-book-open-variant.svg")
|
||||||
(,(rx string-start "guix" string-end) ,(expand-file-name "guix.svg" oni-org-icons-dir) ,@svg)
|
("Morning Cup of Coding" . "bxs-coffee.svg")
|
||||||
(,(rx string-start "moving" string-end) ,(expand-file-name "bxs-truck.svg" oni-org-icons-dir) ,@svg)
|
("paper" . "mat-note-text-outline.svg")
|
||||||
(,(rx string-start "security" string-end) ,(expand-file-name "mat-security.svg" oni-org-icons-dir) ,@svg)
|
("question" . "mat-head-question.svg")
|
||||||
(,(rx string-start "website" string-end) ,(expand-file-name "mat-web.svg" oni-org-icons-dir) ,@svg)
|
("music" . "bxs-music.svg")
|
||||||
(,(rx string-start "desktop" string-end) ,(expand-file-name "bx-desktop.svg" oni-org-icons-dir) ,@svg)
|
("emacs" . "emacs.svg")
|
||||||
(,(rx string-start "maint" string-end) ,(expand-file-name "bs-tools.svg" oni-org-icons-dir) ,@svg)
|
("guix" . "guix.svg")
|
||||||
(,(rx string-start "comm" string-end) ,(expand-file-name "bs-telephone-fill.svg" oni-org-icons-dir) ,@svg)
|
("moving" . "bxs-truck.svg")
|
||||||
(,(rx string-start "config" string-end) ,(expand-file-name "bx-cog.svg" oni-org-icons-dir) ,@svg)
|
("security" . "mat-security.svg")
|
||||||
(,(rx string-start "blog" string-end) ,(expand-file-name "bx-rss.svg" oni-org-icons-dir) ,@svg)
|
("website" . "mat-web.svg")
|
||||||
(,(rx string-start "writing" string-end) ,(expand-file-name "bxs-pencil.svg" oni-org-icons-dir) ,@svg)
|
("desktop" . "bx-desktop.svg")
|
||||||
(,(rx string-start "code" string-end) ,(expand-file-name "code.svg" oni-org-icons-dir) ,@svg)
|
("maint" . "bs-tools.svg")
|
||||||
(,(rx string-start "list" string-end) ,(expand-file-name "list.svg" oni-org-icons-dir) ,@svg)
|
("comm" . "bs-telephone-fill.svg")
|
||||||
(,(rx string-start "video" string-end) ,(expand-file-name "video-fill.svg" oni-org-icons-dir) ,@svg)
|
("config" . "bx-cog.svg")
|
||||||
(,(rx string-start "album" string-end) ,(expand-file-name "album-fill.svg" oni-org-icons-dir) ,@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")))
|
||||||
|
|
||||||
(setq org-agenda-files
|
(setq org-agenda-files
|
||||||
(cons oni-org-todo-main-file
|
(cons oni-org-todo-main-file
|
||||||
(mapcar (lambda (file) (expand-file-name file oni-org-exocortex-directory))
|
(oni-org-roam-todo-files)))
|
||||||
(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-tags-todo-honor-ignore-options t)
|
||||||
(setq org-agenda-todo-ignore-scheduled 'future)
|
(setq org-agenda-todo-ignore-scheduled 'future)
|
||||||
(setq org-agenda-restore-windows-after-quit t)
|
(setq org-agenda-restore-windows-after-quit t)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2022.0301.235907
|
;; Version: 2023.0911.203005
|
||||||
;; Package-Requires: (projectile oni-data-dir)
|
;; Package-Requires: (projectile oni-data-dir)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -48,8 +48,5 @@
|
||||||
(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-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))
|
(setq projectile-indexing-method 'alien))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(projectile-mode)
|
|
||||||
|
|
||||||
(provide 'oni-projectile)
|
(provide 'oni-projectile)
|
||||||
;;; oni-projectile.el ends here
|
;;; oni-projectile.el ends here
|
||||||
|
|
Loading…
Reference in a new issue