From 00228c6a1af5c52946512063c8f712c9c273c26f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 21 Jan 2020 23:14:41 -0800 Subject: [PATCH] Update settings for oni-alert --- oni-alert.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/oni-alert.el b/oni-alert.el index 4245699..db1c66a 100644 --- a/oni-alert.el +++ b/oni-alert.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2019.0904.210205 +;; Version: 2020.0121.231217 ;; Package-Requires: (alert) ;; This program is free software; you can redistribute it and/or modify @@ -29,11 +29,14 @@ (require 'alert) (if (eql system-type 'windows-nt) - (progn - (setq alert-default-icon "c:/Users/WillemsenT/Emacs-25.1-2/share/emacs/25.1/etc/images/icons/hicolor/48x48/apps/emacs.png") + (let ((emacs-icon (expand-file-name (concat "../share/emacs/" emacs-version "/etc/images/icons/hicolor/48x48/apps/emacs.png") invocation-directory))) + (setq alert-default-icon emacs-icon) (setq alert-default-style 'toaster) - (setq alert-toaster-command "U:/projects/toaster/toast/bin/Release/toast.exe") - (setq alert-toaster-default-icon "c:/Users/WillemsenT/Emacs-25.1-2/share/emacs/25.1/etc/images/icons/hicolor/48x48/apps/emacs.png")) + (setq alert-toaster-command + (car (cl-remove-if (lambda (loc) (not (file-exists-p loc))) + ' ("~/source/repos/toaster/toast/bin/Release/toast.exe" + "U:/projects/toaster/toast/bin/Release/toast.exe")))) + (setq alert-toaster-default-icon emacs-icon)) (setq alert-default-style 'libnotify)) ;;;###autoload(with-eval-after-load 'alert (require 'oni-alert))