random-scripts/eww/eww-mu4e-messages

18 lines
585 B
Plaintext
Raw Normal View History

2024-08-16 21:09:57 -07:00
#!/usr/bin/env -S emacs -x
;;; -*- mode: emacs-lisp; lexical-binding: t -*-
(require 'server)
(princ
2024-08-18 09:54:18 -07:00
(condition-case _
(if-let ((modeline-string (server-eval-at "server" '(mu4e--modeline-string)))
2024-08-27 18:41:01 -07:00
((string-match "\\([0-9]+\\)\\((\\+[0-9]+)\\)?/[0-9]+ $" modeline-string))
2024-08-18 09:54:18 -07:00
(matched-string (match-string 1 modeline-string)))
(progn
(set-text-properties 0 (length matched-string)
nil
matched-string)
matched-string)
"0")
(error
"0")))
2024-08-16 21:09:57 -07:00
(terpri)