diff --git a/emacs/.emacs.d/site-lisp/oni-windows-nt.el b/emacs/.emacs.d/site-lisp/oni-windows-nt.el index 411f079..b5c5cef 100755 --- a/emacs/.emacs.d/site-lisp/oni-windows-nt.el +++ b/emacs/.emacs.d/site-lisp/oni-windows-nt.el @@ -31,7 +31,8 @@ (require 'find-dired) (require 'ivy) (require 'grep) - (require 'magit)) + (require 'magit) + (require 'alert)) (defun oni-windows-nt--disable-ivy (orig-fun &rest args) "Disable ivy while running ORIG-FUN with ARGS." @@ -44,6 +45,12 @@ (when ivy-enabled (ivy-mode 1))))) +(defun oni-windows-nt--compilation-finish-notify-function (buffer status) + (when (string= (buffer-name buffer) "*compilation*") + (if (string= (string-trim status) "finished") + (alert "Compilation finished succesfully") + (alert "Compilation finished with an error")))) + (add-to-list 'load-path (locate-user-emacs-file "vendor/p4-vc")) (add-to-list 'exec-path "c:/Program Files/Git/bin") (add-to-list 'exec-path "C:/Program Files/Git/usr/bin") @@ -61,6 +68,14 @@ (setq find-ls-option (cons (concat "-exec " exe " -ld {} \";\"") "-ld"))) +(with-eval-after-load 'alert + (setq alert-default-icon "c:/Users/WillemsenT/Emacs-25.1-2/share/emacs/25.1/etc/images/icons/hicolor/48x48/apps/emacs.png") + (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")) + +(add-hook 'compilation-finish-functions #'oni-windows-nt--compilation-finish-notify-function) + (with-eval-after-load 'grep (add-function :around (symbol-function 'grep-read-files) #'oni-windows-nt--disable-ivy))