1
0
Fork 0

[oni-circe] Clear the polybar circe widget when Emacs is closed

This commit is contained in:
Tom Willemse 2022-08-26 23:57:32 -07:00
parent fdeeccf264
commit 30265c17a5

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2022.0826.220512 ;; Version: 2022.0826.235722
;; Package-Requires: (circe oni-lui circe-serenity olivetti) ;; Package-Requires: (circe oni-lui circe-serenity olivetti)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -128,6 +128,9 @@ which may be encrypted."
(oni-circe-colorize oni-circe-tracking-buffers) (oni-circe-colorize oni-circe-tracking-buffers)
(mapconcat #'oni-circe-colorize oni-circe-tracking-buffers)))))) (mapconcat #'oni-circe-colorize oni-circe-tracking-buffers))))))
(defun oni-circe-tracking-clear ()
(shell-command "polybar-msg action circe send \"\"")) ;
(defun oni-circe-polybar-tracking (orig-fun &rest args) (defun oni-circe-polybar-tracking (orig-fun &rest args)
"Update my external status bar when tracking computes a new status line. "Update my external status bar when tracking computes a new status line.
@ -146,5 +149,7 @@ updater once within a minimum duration."
(add-hook 'circe-channel-mode-hook 'olivetti-mode) (add-hook 'circe-channel-mode-hook 'olivetti-mode)
(add-hook 'kill-emacs-hook 'oni-circe-tracking-clear)
(provide 'oni-circe) (provide 'oni-circe)
;;; oni-circe.el ends here ;;; oni-circe.el ends here