From 30265c17a5e01f71fb45f4e298b5c0f20e2610cd Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 26 Aug 2022 23:57:32 -0700 Subject: [oni-circe] Clear the polybar circe widget when Emacs is closed --- oni-circe.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'oni-circe.el') diff --git a/oni-circe.el b/oni-circe.el index 0f3c4ec..ed31906 100644 --- a/oni-circe.el +++ b/oni-circe.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2022.0826.220512 +;; Version: 2022.0826.235722 ;; Package-Requires: (circe oni-lui circe-serenity olivetti) ;; 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) (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) "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 'kill-emacs-hook 'oni-circe-tracking-clear) + (provide 'oni-circe) ;;; oni-circe.el ends here -- cgit v1.2.3-54-g00ecf