diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/jao-custom-browse.el | 2 | ||||
-rw-r--r-- | custom/jao-custom-email.el | 11 | ||||
-rw-r--r-- | custom/jao-custom-gnus.el | 65 |
3 files changed, 47 insertions, 31 deletions
diff --git a/custom/jao-custom-browse.el b/custom/jao-custom-browse.el index ba47df7..0f4ae65 100644 --- a/custom/jao-custom-browse.el +++ b/custom/jao-custom-browse.el @@ -149,7 +149,7 @@ "t.com" "linkedin.com" "bigml.com" "slack.com" "zoom.us")) (defvar jao-browse--external-regexp - (format "https?://.*%s\\(/.*\\)?" + (format "https?://\\(.+\\.\\)*%s\\(/.*\\)?" (regexp-opt jao-browse-external-domains))) (defun jao-wget--regexp () diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index 262b312..2e886ff 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -209,13 +209,18 @@ (setq smtpmail-smtp-service 587)) (defun jao-sendmail-local () - (setq send-mail-function 'sendmail-send-it) + (setq send-mail-function 'smtpmail-send-it) ;; send-mail-function + ;; (setq sendmail-program "/usr/sbin/sendmail") (setq smtpmail-auth-supported nil) ;; (cram-md5 plain login) (setq smtpmail-servers-requiring-authorization nil) (setq smtpmail-smtp-user nil) (setq smtpmail-smtp-server "127.0.0.1") (setq smtpmail-smtp-service 25)) +(defun jao-sendmail-send-it () + (with-temp-message "Sending email..." + (sendmail-send-it))) + (defun jao-sendmail-msmtp () (setq send-mail-function 'sendmail-send-it sendmail-program (executable-find "msmtp") @@ -223,9 +228,7 @@ message-sendmail-envelope-from 'header mail-envelope-from 'header)) -(jao-d-l - (jao-sendmail-msmtp) - (jao-sendmail-local)) +(jao-sendmail-local) ;;; bbdb ;; (jao-load-path "bbdb/lisp") diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index bc39f5b..597ad70 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -89,7 +89,12 @@ (defun jao-gnus-use-two-panes () (let ((wide-len jao-gnus-wide-width) (groups-len jao-gnus-groups-width) - (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) + (summary-len (- jao-gnus-wide-width jao-gnus-groups-width)) + (msg-edit '(horizontal 1.0 + (message 1.0 point) + (vertical 0.5 + ("*Org Agenda*" 0.5) + ("inbox.org" 1.0))))) (gnus-add-configuration `(article (horizontal 1.0 @@ -102,16 +107,8 @@ `(group (horizontal 1.0 (group 0.5 point) (vertical 1.0 - ("*Org Agenda*" 0.5) - ("inbox.org" 1.0) - ;; ("*notmuch-hello*" 1.0) - )))) - - (gnus-add-configuration - `(message (horizontal 1.0 (message 1.0 point)))) - - (gnus-add-configuration - `(reply-yank (horizontal 1.0 (message 1.0 point)))) + ("*Org Agenda*" 1.0) + ("*Calendar*" 9))))) (gnus-add-configuration `(summary @@ -119,11 +116,16 @@ (vertical ,groups-len (group 1.0)) (vertical 1.0 (summary 1.0 point))))) + (gnus-add-configuration `(message ,msg-edit)) + + (gnus-add-configuration `(forward ,msg-edit)) + + (gnus-add-configuration `(reply-yank ,msg-edit)) + (gnus-add-configuration - `(reply - (horizontal 1.0 - (message ,(- wide-len 100) point) - (article 1.0)))))) + `(reply (horizontal 1.0 + (message ,(- wide-len 100) point) + (article 1.0)))))) (if jao-gnus-use-three-panes (jao-gnus-use-three-panes) @@ -255,10 +257,12 @@ ;;; groups (setq gnus-group-line-format - " %m%S%p%3y%P%* %~(pad-right 30)G %B\n" + " %m%S%p%3y%P%* %~(pad-right 25)G %B\n" ;; " %m%S%p%P:%~(pad-right 35)c %3y %B\n" ;; " %m%S%p%3y%P%* %~(pad-right 30)C %B\n" - gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n" + ;; gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n" + gnus-face-2 'jao-themes-f11 + gnus-topic-line-format "%i %2{%~(pad-right 8)n ┄┄ %A%v%}\n" gnus-group-uncollapsed-levels 2 gnus-auto-select-subject 'unread gnus-large-newsgroup 2000) @@ -642,6 +646,8 @@ (let ((inhibit-message t)) (gnus-demon-scan-news) (jao-shell-exec "notmuch-gnus-tags.sh") + (when-let* ((a (get-buffer "*Org Agenda*"))) + (with-current-buffer a (org-agenda-redo-all))) (jao-gnus--notify))) (defun jao-gnus--scan-local-mail () @@ -696,9 +702,12 @@ (defun jao-gnus--unread-counts () (seq-reduce (lambda (r g) (let ((n (gnus-group-unread (car g)))) - (if (and (numberp n) (> n 0)) (cons (cons (car g) n) r) r))) + (if (and (numberp n) (> n 0)) + (cons (+ n (car r)) + (cons (cons (car g) n) (cdr r))) + r))) gnus-newsrc-alist - ())) + '(0))) (defun jao-gnus-unread-count () (seq-reduce (lambda (c g) (+ c (or (gnus-group-unread (car g)) 0))) @@ -725,13 +734,17 @@ (or (car (jao-gnus--nnw-count)) "")))) (defun jao-gnus--notify-strs () - (let ((counts (jao-gnus--unread-counts))) - (append - (seq-filter #'identity - (seq-map (lambda (args) - (apply 'jao-gnus--unread-label counts args)) - jao-gnus-tracked-groups)) - (jao-gnus--nnw-count)))) + (let* ((all (jao-gnus--unread-counts)) + (counts (cdr all)) + (total (car all))) + (jao-when-darwin + (jao-shell-exec + (format "echo '%s | color=%s' >/tmp/xbar" + total (if (> total 0) "#8b3626" "#efefef")))) + (seq-filter #'identity + (seq-map (lambda (args) + (apply 'jao-gnus--unread-label counts args)) + jao-gnus-tracked-groups)))) (defun jao-gnus--notify () (setq jao-gnus--notify-strs (jao-gnus--notify-strs)) |