summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/elisp/misc.el26
-rw-r--r--custom/jao-custom-chats.el62
-rw-r--r--custom/jao-custom-notmuch.el8
-rw-r--r--custom/jao-custom-programming.el1
-rw-r--r--init.el49
-rw-r--r--lib/eos/jao-r2e.el16
6 files changed, 86 insertions, 76 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el
index 77089ff..7cf9029 100644
--- a/attic/elisp/misc.el
+++ b/attic/elisp/misc.el
@@ -1244,3 +1244,29 @@ It should be the title of the web page as returned by `rdrview'"
counts
0)))
(when (> n 0) `(:propertize ,(format "%s%d " label n) face ,face))))
+
+;;; ement
+(use-package ement
+ :disabled t
+ :ensure t
+ :init (setq ement-save-sessions t
+ ement-sessions-file (locate-user-emacs-file "cache/ement.el")
+ ement-room-avatars nil
+ ement-notify-dbus-p nil
+ ement-room-left-margin-width 0
+ ement-room-right-margin-width 11
+ ement-room-timestamp-format "%H:%M"
+ ement-room-timestamp-header-format "­­--------")
+
+ :custom ((ement-room-message-format-spec "(%S) %B%r%R %t"))
+
+ :config
+ (defun jao-ement-track (event room session)
+ (when (ement-notify--room-unread-p event room session)
+ (when-let ((n (ement-room--buffer-name room))
+ (b (get-buffer n)))
+ (tracking-add-buffer b))))
+
+ (add-hook 'ement-event-hook #'jao-ement-track)
+ (jao-shorten-modes 'ement-room-mode)
+ (jao-tracking-cleaner "^\\*Ement Room: \\(.+\\)\\*" "@\\1"))
diff --git a/custom/jao-custom-chats.el b/custom/jao-custom-chats.el
index c2105c6..60368d3 100644
--- a/custom/jao-custom-chats.el
+++ b/custom/jao-custom-chats.el
@@ -117,40 +117,7 @@
(enable-lui-track)
(circe-lagmon-mode))
-;;;; telegram
-(use-package telega
- :ensure t
- :custom
- (telega-use-tracking-for '(unmuted) ;; '(or unmuted mention)
- telega-rainbow-color-custom-for nil
- telega-msg-rainbow-title nil
- telega-sticker-set-download t
- telega-symbol-checkmark "·"
- telega-symbol-heavy-checkmark "×"
- telega-symbol-verified "*")
- :config
- (define-key global-map (kbd "C-c C-t") telega-prefix-map)
- (setq telega-chat-show-avatars nil
- telega-chat-prompt-insexp '(telega-ins "> ")
- telega-completing-read-function #'completing-read
- telega-root-show-avatars nil
- telega-emoji-use-images nil
- telega-temp-dir "/tmp/telega"
- telega-symbol-horizontal-bar
- (propertize "-" 'face 'jao-themes-f00)
- telega-symbol-vertical-bar
- (propertize "| " 'face 'jao-themes-dimm)
- telega-mode-line-string-format
- '(:eval (telega-mode-line-unread-unmuted))
- telega-use-images (display-graphic-p)
- telega-open-file-function #'jao--see
- telega-open-message-as-file
- (unless (display-graphic-p) '(photo video animation)))
- (with-eval-after-load "tracking"
- (jao-shorten-modes 'telega-chat-mode)
- (jao-tracking-faces 'telega-tracking))
- (telega-mode-line-mode 1))
-
+;;;; startup
(defun jao-telega ()
(interactive)
(jao-tracking-go-to-chats)
@@ -158,33 +125,6 @@
(pop-to-buffer telega-root-buffer-name)
(telega)))
-;;;; ement
-(use-package ement
- :disabled t
- :ensure t
- :init (setq ement-save-sessions t
- ement-sessions-file (locate-user-emacs-file "cache/ement.el")
- ement-room-avatars nil
- ement-notify-dbus-p nil
- ement-room-left-margin-width 0
- ement-room-right-margin-width 11
- ement-room-timestamp-format "%H:%M"
- ement-room-timestamp-header-format "­­--------")
-
- :custom ((ement-room-message-format-spec "(%S) %B%r%R %t"))
-
- :config
- (defun jao-ement-track (event room session)
- (when (ement-notify--room-unread-p event room session)
- (when-let ((n (ement-room--buffer-name room))
- (b (get-buffer n)))
- (tracking-add-buffer b))))
-
- (add-hook 'ement-event-hook #'jao-ement-track)
- (jao-shorten-modes 'ement-room-mode)
- (jao-tracking-cleaner "^\\*Ement Room: \\(.+\\)\\*" "@\\1"))
-
-;;;; startup
(defun jao-chats (&optional p)
(interactive "P")
(when (or p (y-or-n-p "Connect to telegram? "))
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 9fb9231..ca2664c 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -27,6 +27,7 @@
(format "%s%s" (plist-get c :name) (plist-get c :count)))
(defvar jao-notmuch-mac-xbar t)
+(defvar jao-notmuch-mac-mail-badge nil)
(defun jao-notmuch-xbar ()
(let ((cnts (notmuch-hello-query-counts jao-notmuch-xbar-queries)))
@@ -37,7 +38,8 @@
(interactive)
(let* ((cnts (notmuch-hello-query-counts jao-notmuch-minibuffer-queries))
(mc (jao-d-l
- (unless jao-notmuch-mac-xbar (jao-mac-app-badge "Mail")) 0))
+ (when jao-notmuch-mac-mail-badge (jao-mac-app-badge "Mail"))
+ 0))
(cnts (if (> (or mc 0) 0) (cons `(:name "" :count ,mc) cnts) cnts)))
(setq jao-notmuch-minibuffer-string
(mapconcat (lambda (c)
@@ -133,6 +135,8 @@
notmuch-saved-searches nil
jao-notmuch-widened-searches nil)
+ (when other (jao-notmuch--def-searches (car other) (cdr other)))
+
(jao-notmuch--def-searches "inbox"
`(,(jao-notmuch--q "inbox" "i")
,(jao-notmuch--q "write" "w")
@@ -140,8 +144,6 @@
,(jao-notmuch--q "trove" "t")
,(jao-notmuch--q "local" "x")))
- (when other (jao-notmuch--def-searches (car other) (cdr other)))
-
(jao-notmuch--def-searches "news"
(mapcar 'jao-notmuch--q-feed
'(("fn" "news")
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el
index e879222..d8f9308 100644
--- a/custom/jao-custom-programming.el
+++ b/custom/jao-custom-programming.el
@@ -58,6 +58,7 @@
(flymake-mode 1)
(eglot-inlay-hints-mode -1)
(setq-local eldoc-display-functions '(eldoc-display-in-buffer)))
+ (setq eglot-events-buffer-config '(:size 0 :format full))
:config
:hook (eglot-managed-mode . jao-eglot-managed-mode-hook)
:bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle))))
diff --git a/init.el b/init.el
index fe69f12..1f2500b 100644
--- a/init.el
+++ b/init.el
@@ -1152,7 +1152,7 @@
(t (format "%s" (or (jao-afio-frame-name) ""))))
'face 'font-lock-warning-face))
- (unless jao-afio-use-frames
+ (unless nil ;; jao-afio-use-frames
(jao-minibuffer-add-variable '(jao-current--frame-id) 100))
(setq frame-title-format '("emacs - " (:eval (jao-afio-frame-name))))
@@ -1161,8 +1161,8 @@
(global-set-key (kbd "C-c t") #'jao-afio-goto-chats))
(jao-when-darwin
- (jao-afio-add-frame-parameters "docs" (width . 195) (height . 70))
- (jao-afio-add-frame-parameters nil (width . 197) (height . 82))
+ (jao-afio-add-frame-parameters "docs" (width . 195) (height . 75))
+ (jao-afio-add-frame-parameters nil (width . 163) (height . 70))
(add-to-list 'default-frame-alist '(width . 80)))
:bind (("C-c f" . 'jao-afio-goto-main)
@@ -1658,9 +1658,41 @@
(jao-exec-in-term (format "ssh %s" h) (format "*ssh %s*" h))))
;;; Chats
-(jao-when-linux (require 'jao-custom-chats))
-
-;;;; Mastodon
+;;;; telegram
+(use-package telega
+ :ensure t
+ :custom
+ (telega-use-tracking-for '(unmuted) ;; '(or unmuted mention)
+ telega-rainbow-color-custom-for nil
+ telega-msg-rainbow-title nil
+ telega-sticker-set-download t
+ telega-symbol-checkmark "·"
+ telega-symbol-heavy-checkmark "×"
+ telega-symbol-verified "*")
+ :config
+ (define-key global-map (kbd "C-c C-t") telega-prefix-map)
+ (setq telega-chat-show-avatars nil
+ telega-chat-prompt-insexp '(telega-ins "> ")
+ telega-completing-read-function #'completing-read
+ telega-root-show-avatars nil
+ telega-emoji-use-images nil
+ telega-temp-dir "/tmp/telega"
+ telega-symbol-horizontal-bar
+ (propertize "-" 'face 'jao-themes-f00)
+ telega-symbol-vertical-bar
+ (propertize "| " 'face 'jao-themes-dimm)
+ telega-mode-line-string-format
+ '(:eval (telega-mode-line-unread-unmuted))
+ telega-use-images (display-graphic-p)
+ telega-open-file-function #'jao--see
+ telega-open-message-as-file
+ (unless (display-graphic-p) '(photo video animation)))
+ (with-eval-after-load "tracking"
+ (jao-shorten-modes 'telega-chat-mode)
+ (jao-tracking-faces 'telega-tracking))
+ (telega-mode-line-mode 1))
+
+;;;; mastodon
(use-package mastodon
:ensure t
:init
@@ -1751,6 +1783,11 @@
("?" "help" describe-mode)
("q" "quit" transient-quit-one)]))
+
+;;;; and more
+(jao-when-linux (require 'jao-custom-chats))
+
+
;;; Multimedia
(jao-when-linux (require 'jao-custom-multimedia))
diff --git a/lib/eos/jao-r2e.el b/lib/eos/jao-r2e.el
index 09b4504..568b8bc 100644
--- a/lib/eos/jao-r2e.el
+++ b/lib/eos/jao-r2e.el
@@ -24,6 +24,7 @@
(autoload 'eww-view-source "eww")
(autoload 'jao-notmuch-subtags "jao-notmuch")
+(defvar jao-r2e-command "r2e")
(defvar jao-r2e-confirm-toggle nil)
(defconst jao-r2e--buffer "*r2e*")
@@ -68,7 +69,7 @@
"Execute a r2e command THINGS in the given BUFFER."
(let ((b (or buffer (pop-to-buffer (jao-r2e--buffer)))))
(let ((inhibit-read-only t)
- (cmd (format "r2e %s" things)))
+ (cmd (format "%s %s" jao-r2e-command things)))
(unless buffer
(with-current-buffer b (delete-region (point-min) (point-max))))
(with-temp-message (format "Running: %s ...." cmd)
@@ -216,12 +217,15 @@
(let* ((name (read-string "Feed name: " title))
(cats (cons "prog" (jao-notmuch-subtags "feeds")))
(cat (completing-read "Category: " cats nil t cat))
- (subs (format "r2e add %s '%s' feeds.%s@localhost"
- name url cat)))
+ (sfmt (format "%%s add %s '%s' mail+feeds_%s@jao.io" name url cat))
+ (subs ))
(with-temp-message "Subscribing..."
- (shell-command-to-string subs))
- (with-temp-message "Retrieving feed..."
- (shell-command (format "r2e run %s" name)))
+ (shell-command-to-string (format sfmt "r2e"))
+ (when (not (string= jao-r2e-command "r2e"))
+ (shell-command-to-string (format sfmt jao-r2e-command))))
+ (when (y-or-n-p "Retrieve feeds now? ")
+ (with-temp-message "Retrieving feed..."
+ (shell-command (format "%s run %s" jao-r2e-command name))))
(when relist (jao-r2e-list)))))))
(provide 'jao-r2e)