aboutsummaryrefslogtreecommitdiffstats
path: root/oni-circe.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-08-26 23:57:32 -0700
committerGravatar Tom Willemse2022-08-26 23:57:32 -0700
commit30265c17a5e01f71fb45f4e298b5c0f20e2610cd (patch)
tree1afbd0d8f9ec373f8174b41d1a3140f34e8fb8aa /oni-circe.el
parentfdeeccf264efe9e738e41113b4cea7a8f4b08e23 (diff)
downloademacs-config-30265c17a5e01f71fb45f4e298b5c0f20e2610cd.tar.gz
emacs-config-30265c17a5e01f71fb45f4e298b5c0f20e2610cd.zip
[oni-circe] Clear the polybar circe widget when Emacs is closed
Diffstat (limited to 'oni-circe.el')
-rw-r--r--oni-circe.el7
1 files changed, 6 insertions, 1 deletions
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 <tom@ryuslash.org>
;; 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