Add alert and compilation notification configuration
This commit is contained in:
parent
8888df80fd
commit
dc6f85c2cb
1 changed files with 16 additions and 1 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue