mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
Add desktop notification when available
Signed-off-by: Julien Danjou <julien@danjou.info> Signed-off-by: Dimitri Fontaine <dim@tapoueh.org>
This commit is contained in:
parent
b663d09a2c
commit
e51d0ccca9
16
el-get.el
16
el-get.el
|
@ -33,6 +33,7 @@
|
|||
;; - Implement support for git submodules with the command
|
||||
;; `git submodule update --init --recursive`
|
||||
;; - Add catch-all post-install and post-update hooks
|
||||
;; - Add desktop notification on install/update.
|
||||
;;
|
||||
;; 0.9 - 2010-08-24 - build me a shell
|
||||
;;
|
||||
|
@ -1434,4 +1435,19 @@ welcome to use `autoload' too."
|
|||
;; return the list of packages
|
||||
ret))
|
||||
|
||||
(when (require 'notifications nil t)
|
||||
(defun el-get-post-update-notification (package)
|
||||
"Notify the PACKAGE has been updated."
|
||||
(notifications-notify
|
||||
:title (format "%s updated" package)
|
||||
:body "This package has been updated successfully by el-get."))
|
||||
(add-hook 'el-get-post-update-hooks 'el-get-post-update-notification)
|
||||
|
||||
(defun el-get-post-install-notification (package)
|
||||
"Notify the PACKAGE has been installed."
|
||||
(notifications-notify
|
||||
:title (format "%s installed" package)
|
||||
:body "This package has been installed successfully by el-get."))
|
||||
(add-hook 'el-get-post-install-hooks 'el-get-post-install-notification))
|
||||
|
||||
(provide 'el-get)
|
||||
|
|
Loading…
Reference in New Issue
Block a user