summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-10-14 23:46:06 +0100
committerjao <jao@gnu.org>2026-10-14 23:46:06 +0100
commitc7baa477cf0041ac006f55795cd6619a569418c1 (patch)
tree97c8ab4176c2ca525827129067b3c6957a0abf11 /init.el
parent84c76e13f81e1c3fe133aff7218693de4db4384b (diff)
downloadelibs-c7baa477cf0041ac006f55795cd6619a569418c1.tar.gz
elibs-c7baa477cf0041ac006f55795cd6619a569418c1.tar.bz2
back to linux tweaks
Diffstat (limited to 'init.el')
-rw-r--r--init.el136
1 files changed, 65 insertions, 71 deletions
diff --git a/init.el b/init.el
index 2a69e8e..5c79f06 100644
--- a/init.el
+++ b/init.el
@@ -33,12 +33,11 @@
("melpa" . "https://melpa.org/packages/"))
package-archive-priorities '(("gnu-devel" . 2)
("nongnu-devel" . 1)
- ("melpa" . 0)))
+ ("melpa" . 0))
+ package-install-upgrade-built-in t)
(package-initialize)
-(require 'use-package)
-
(use-package gnu-elpa-keyring-update :ensure t)
;;;; .elc vs .el loading
@@ -165,7 +164,7 @@
;;;; docker
(use-package dockerfile-mode :ensure t)
-(use-package docker :ensure t)
+(jao-when-darwin (use-package docker :ensure t))
;;;; sleep/awake
(use-package jao-sleep
@@ -834,71 +833,71 @@
(require 'jao-custom-completion)
;;;; recoll
-(jao-when-linux (jao-load-path "consult-recoll"))
-
-(use-package consult-recoll
- :if (jao-is-linux)
- :commands (consult-recoll consult-recoll-embark-setup)
- :init
- (defun jao-recoll-format (title url _mtype)
- (let* ((u (replace-regexp-in-string "file://" "" url))
- (u (replace-regexp-in-string "/home/jao/" "" u))
- (u (replace-regexp-in-string
- "\\(doc\\|org/doc\\|.emacs.d/gnus/Mail\\|var/mail\\)/" "" u)))
- (format "%s (%s)" ;; "%s (%s, %s)"
- title
- (propertize u 'face 'jao-themes-f01)
- ;; (propertize mtype 'face 'jao-themes-f01)
- )))
-
- (defun jao-recoll-open-html (file &optional _page)
- (if (string-match-p "\.epub\\'" file)
- (find-file file)
- (jao-afio-goto-www)
- (if jao-afio-use-w3m (w3m-find-file file) (eww-open-file file))))
-
- (defun jao-recoll-open-pdf (file &optional page)
- (if (string-match-p "/gnus/Mail/" file)
- (funcall
- (or (cdr (assoc-string "message/rfc822" consult-recoll-open-fns))
- 'find-file)
- file
- page)
- (jao-open-doc file page)))
-
- (defun jao-recoll-consult-messages ()
- (interactive)
- (consult-recoll "mime:message "))
-
- (defun jao-recoll-consult-docs ()
- (interactive)
- (consult-recoll (format "dir:%s/doc " (jao-org-dir))))
-
- (defun jao-recoll-consult-notes ()
- "Use consult-recoll to search notes."
- (interactive)
- (consult-recoll (format "dir:%s " jao-org-notes-dir)))
+(jao-when-linux
+ (jao-load-path "consult-recoll")
+
+ (defun jao-recoll-format (title url _mtype)
+ (let* ((u (replace-regexp-in-string "file://" "" url))
+ (u (replace-regexp-in-string "/home/jao/" "" u))
+ (u (replace-regexp-in-string
+ "\\(doc\\|org/doc\\|.emacs.d/gnus/Mail\\|var/mail\\)/" "" u)))
+ (format "%s (%s)" ;; "%s (%s, %s)"
+ title
+ (propertize u 'face 'jao-themes-f01)
+ ;; (propertize mtype 'face 'jao-themes-f01)
+ )))
+
+ (defun jao-recoll-open-html (file &optional _page)
+ (if (string-match-p "\.epub\\'" file)
+ (find-file file)
+ (jao-afio-goto-www)
+ (if jao-afio-use-w3m (w3m-find-file file) (eww-open-file file))))
+
+ (defun jao-recoll-open-pdf (file &optional page)
+ (if (string-match-p "/gnus/Mail/" file)
+ (funcall
+ (or (cdr (assoc-string "message/rfc822" consult-recoll-open-fns))
+ 'find-file)
+ file
+ page)
+ (jao-open-doc file page)))
+
+ (defun jao-recoll-consult-messages ()
+ (interactive)
+ (consult-recoll "mime:message "))
- (setq consult-recoll-open-fns
- '(("application/pdf" . jao-recoll-open-pdf)
- ("text/html" . jao-recoll-open-html))
- consult-recoll-search-flags 'query
- consult-recoll-inline-snippets t
- consult-recoll-format-candidate #'jao-recoll-format)
+ (defun jao-recoll-consult-docs ()
+ (interactive)
+ (consult-recoll (format "dir:%s/doc " (jao-org-dir))))
- :config
+ (defun jao-recoll-consult-notes ()
+ "Use consult-recoll to search notes."
+ (interactive)
+ (consult-recoll (format "dir:%s " jao-org-notes-dir)))
+
+ (setq consult-recoll-open-fns
+ '(("application/pdf" . jao-recoll-open-pdf)
+ ("text/html" . jao-recoll-open-html))
+ consult-recoll-search-flags 'query
+ consult-recoll-inline-snippets t
+ consult-recoll-format-candidate #'jao-recoll-format)
+
+ (use-package consult-recoll
+ :demand t
+ :commands (consult-recoll consult-recoll-embark-setup)
+ :config
+ (consult-customize consult-recoll :preview-key 'any)
- (consult-customize consult-recoll :preview-key 'any)
- (with-eval-after-load "embark" (consult-recoll-embark-setup))
+ (with-eval-after-load "embark" (consult-recoll-embark-setup))
- (transient-define-prefix jao-transient-recoll ()
- ["Consult recoll queries"
- ("r" "everywhere" consult-recoll)
- ("n" "on notes" jao-recoll-consult-notes)
- ("d" "on docs" jao-recoll-consult-docs)
- ("m" "on messages" jao-recoll-consult-messages)])
+ (transient-define-prefix jao-transient-recoll ()
+ ["Consult recoll queries"
+ ("r" "everywhere" consult-recoll)
+ ("n" "on notes" jao-recoll-consult-notes)
+ ("d" "on docs" jao-recoll-consult-docs)
+ ("m" "on messages" jao-recoll-consult-messages)])
- :bind (("s-r" . #'jao-transient-recoll)))
+ :bind (("s-r" . #'jao-transient-recoll))))
;;;; alternative (mac): consult-spotlight
@@ -1382,10 +1381,6 @@
(add-to-list 'display-buffer-alist
'("\\*Async Shell Command\\*" (display-buffer-no-window)))
-(use-package nushell-ts-mode
- :ensure t
- :config (setq nushell-ts-mode-indent-offset 4))
-
;;;; eat
(use-package eat
:ensure t
@@ -1603,8 +1598,7 @@
(setq magit-repository-directories
(jao-d-l
'(("/Users/jao/Projects" . 3))
- '(("/home/jao/usr/bigml" . 2)
- ("/home/jao/usr/jao" . 3)
+ '(("/home/jao/usr/jao" . 3)
("/usr/local/src" . 1))))
(setq magit-status-initial-section nil
@@ -2138,7 +2132,7 @@
("do" "open doc" jao-open-doc)
("dr" "search docs with recoll" jao-recoll-consult-docs)]
["Monitors"
- ("p" "list projects" list-projects)
+ ;; ("p" "list projects" list-projects)
;; ("p" "htop" jao-term-htop)
("P" "pasytray" jao-toggle-pasystray-applet)
("x" "restart i3bar" jao-river-restart-i3bar :if jao-river-enabled-p)