From b116c6fa988f56373c35dd5009f1ad65da7582da Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 27 Mar 2021 02:29:16 +0000 Subject: unused jao-osd gone --- lib/eos/jao-notify.el | 9 ++++--- lib/eos/jao-osd.el | 55 ---------------------------------------- lib/media/jao-emms-info-track.el | 1 - 3 files changed, 5 insertions(+), 60 deletions(-) delete mode 100644 lib/eos/jao-osd.el (limited to 'lib') diff --git a/lib/eos/jao-notify.el b/lib/eos/jao-notify.el index dc48ca4..5e7e627 100644 --- a/lib/eos/jao-notify.el +++ b/lib/eos/jao-notify.el @@ -1,6 +1,6 @@ ;; jao-notify.el -- Interacting with notification daemon -;; Copyright (c) 2017, 2019, 2020 Jose Antonio Ortega Ruiz +;; Copyright (c) 2017, 2019, 2020, 2021 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Start date: Sun Jan 08, 2017 20:24 @@ -18,15 +18,16 @@ (declare-function notifications-notify "notifications") (defun jao-notify (msg &optional title icon) - (if jao-notify-use-messages-p - (message "%s%s%s" (or title "") (if title ": " "") (or msg "")) + (let ((title (when (and title (not (string-blank-p title))) title))) + (if jao-notify-use-messages-p + (message "%s%s%s" (or title "") (if title ": " "") (or msg "")) (let* ((args `(:timeout ,jao-notify-timeout)) (args (append args (if title `(:title ,title :body ,msg) `(:title ,msg)))) (args (if (and (stringp icon) (file-exists-p icon)) (append args `(:app-icon ,(format "%s" icon))) args))) - (apply 'notifications-notify args)))) + (apply 'notifications-notify args))))) (provide 'jao-notify) diff --git a/lib/eos/jao-osd.el b/lib/eos/jao-osd.el deleted file mode 100644 index acdc629..0000000 --- a/lib/eos/jao-osd.el +++ /dev/null @@ -1,55 +0,0 @@ -;; candy -(defvar jao-osd-cat-color-fg "black") -(defvar jao-osd-cat-color-bg "white") -(defvar jao-osd-cat-font "Andika Basic 16") -;; (setq jao-osd-cat-font "Inconsolata 20") -(defun jao-osd-cat-font (&optional font) - (or font jao-osd-cat-font)) - -(defun jao-osd-process-args (&optional font fg bg) - `("-n" ,(jao-osd-cat-font font) - "-R" ,(or bg jao-osd-cat-color-fg) "-B" ,(or fg jao-osd-cat-color-bg) - "-b" "200" "-r" "255" - "-e" "0" "-t" "2" "-d" "10" "-p" "0" "-x" "10" "-y" "10" "-u" "5000")) - -(setq jao-osd-processes (make-hash-table)) - -(defsubst jao-osd--delete-process (name) - (remhash name jao-osd-processes)) - -(defun jao-osd-process (name &optional font color) - (let ((proc (gethash name jao-osd-processes))) - (or (and proc (eq (process-status proc) 'run) proc) - (puthash name - (apply 'start-process - `("notifications" - ,(format "*notifications/%s*" name) - "aosd_cat" - ,@(jao-osd-process-args))) - jao-osd-processes)))) - -(defun jao-osd-cat (name lines) - (let* ((proc (jao-osd-process name)) - (lines (if (listp lines) lines (list lines))) - (trail (- 5 (length lines)))) - (when proc - (dolist (line lines) - (send-string proc (format "%s\n" line)))))) - ; (when (> trail 0) (send-string proc (make-string trail ?\n)))))) - -(defun jao-osd--names () - (let (names) - (maphash (lambda (n k) (push n names)) jao-osd-processes) - (reverse names))) - -(defun jao-osd-kill (name) - (let ((proc (gethash name jao-osd-processes))) - (when (processp proc) - (kill-process proc)))) - -(defun jao-osd-kill-notifiers () - (interactive) - (maphash (lambda (n p) (ignore-errors (kill-process p))) jao-osd-processes) - (clrhash jao-osd-processes)) - -(provide 'jao-osd) diff --git a/lib/media/jao-emms-info-track.el b/lib/media/jao-emms-info-track.el index 50a7027..ac9fa74 100644 --- a/lib/media/jao-emms-info-track.el +++ b/lib/media/jao-emms-info-track.el @@ -23,7 +23,6 @@ (require 'emms) (require 'emms-tag-editor) (require 'emms-player-mpd) -(require 'jao-osd) (require 'jao-emms) (require 'jao-minibuffer) -- cgit v1.2.3