aboutsummaryrefslogtreecommitdiffstats
path: root/oni-circe.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2023-07-26 00:35:27 -0700
committerGravatar Tom Willemse2023-07-26 00:35:27 -0700
commite497aeccae2a50b4ac736d7a3b96993738344af6 (patch)
tree77feba2d6c070dc8b6c34a8bc2e73e14cc3470a2 /oni-circe.el
parent3ec56e96414c453e693269ea4b89b664b5274c64 (diff)
downloademacs-config-e497aeccae2a50b4ac736d7a3b96993738344af6.tar.gz
emacs-config-e497aeccae2a50b4ac736d7a3b96993738344af6.zip
[oni-circe] Disable sending tracking to polybar
I'm not using polybar anymore.
Diffstat (limited to 'oni-circe.el')
-rw-r--r--oni-circe.el93
1 files changed, 47 insertions, 46 deletions
diff --git a/oni-circe.el b/oni-circe.el
index b898812..1d14742 100644
--- a/oni-circe.el
+++ b/oni-circe.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2023.0717.113326
+;; Version: 2023.0725.143552
;; Package-Requires: (circe oni-lui circe-serenity olivetti)
;; This program is free software; you can redistribute it and/or modify
@@ -108,54 +108,55 @@ which may be encrypted."
;; with me from when I was using mowedline. I've adapted the code to work for
;; polybar instead and renamed all of the functions.
-(defvar oni-circe-tracking-buffers nil)
-(defvar oni-circe-tracking-timer nil)
-
-(defun oni-circe-colorize (s)
- "Turn any color description of S into one that Polybar understands."
- (cond
- ((stringp s) (string-trim s))
- ((eq ':propertize (car s))
- (let ((s (cadr s))
- (face (plist-get (cddr s) 'face)))
- (if face
- (format "%%{F%s}%s%%{F-}"
- (face-foreground face)
- (substring-no-properties s))
- s)))
- (t "")))
-
-(defun oni-circe-update-polybar ()
- "Send a command to Polybar to update my Circe widget."
- (setq oni-circe-tracking-timer nil)
- (shell-command (format "polybar-msg action circe send %s"
- (shell-quote-argument
- (if (stringp oni-circe-tracking-buffers)
- (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.
-
-Also suppress tracking in the mode-line. Since tracking-status
-may be called many times in quick succession, for example on a
-make-frame-visible event, we use a short timer to only call the
-updater once within a minimum duration."
- (setq oni-circe-tracking-buffers (apply orig-fun args))
- (when oni-circe-tracking-timer
- (cancel-timer oni-circe-tracking-timer))
- (setq oni-circe-tracking-timer
- (run-at-time 0.2 nil #'oni-circe-update-polybar))
- nil)
-
-(advice-add 'tracking-status :around #'oni-circe-polybar-tracking)
+;; (defvar oni-circe-tracking-buffers nil)
+;; (defvar oni-circe-tracking-timer nil)
+
+;; (defun oni-circe-colorize (s)
+;; "Turn any color description of S into one that Polybar understands."
+;; (cond
+;; ((stringp s) (string-trim s))
+;; ((eq ':propertize (car s))
+;; (let ((s (cadr s))
+;; (face (plist-get (cddr s) 'face)))
+;; (if face
+;; (format "%%{F%s}%s%%{F-}"
+;; (face-foreground face)
+;; (substring-no-properties s))
+;; s)))
+;; (t "")))
+
+;; (defun oni-circe-update-polybar ()
+;; "Send a command to Polybar to update my Circe widget."
+;; (setq oni-circe-tracking-timer nil)
+;; (shell-command (format "polybar-msg action circe send %s"
+;; (shell-quote-argument
+;; (if (stringp oni-circe-tracking-buffers)
+;; (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.
+
+;; Also suppress tracking in the mode-line. Since tracking-status
+;; may be called many times in quick succession, for example on a
+;; make-frame-visible event, we use a short timer to only call the
+;; updater once within a minimum duration."
+;; (setq oni-circe-tracking-buffers (apply orig-fun args))
+;; (when oni-circe-tracking-timer
+;; (cancel-timer oni-circe-tracking-timer))
+;; (setq oni-circe-tracking-timer
+;; (run-at-time 0.2 nil #'oni-circe-update-polybar))
+;; nil)
+
+;; (advice-add 'tracking-status :around #'oni-circe-polybar-tracking)
+;; (advice-remove 'tracking-status #'oni-circe-polybar-tracking)
(add-hook 'circe-channel-mode-hook 'olivetti-mode)
-(add-hook 'kill-emacs-hook 'oni-circe-tracking-clear)
+;; (add-hook 'kill-emacs-hook 'oni-circe-tracking-clear)
(provide 'oni-circe)
;;; oni-circe.el ends here