From 786de1134a229c5905c6a792fdec119c8132250f Mon Sep 17 00:00:00 2001 From: Sako <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 24 Sep 2023 13:12:22 +0400 Subject: [PATCH] Sync windows Config --- config/emacs/emacs.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/config/emacs/emacs.org b/config/emacs/emacs.org index 798d0765..2f9060e4 100644 --- a/config/emacs/emacs.org +++ b/config/emacs/emacs.org @@ -418,6 +418,33 @@ M-x org-bable-tangle :config (org-roam-setup))) #+end_src +** Org-Alert +#+begin_src emacs-lisp + (use-package org-alert + :ensure t + :custom (alert-default-style 'notification) + :config + (setq org-alert-interval 300 + org-alert-notify-cutoff 30 + org-alert-notification-title "Emacs") + (org-alert-enable)) +#+end_src +*** Windows Fix +#+begin_src emacs-lisp +(use-package alert + :config + ;; Add the windows desktop notifications if on windows + (when (eq system-type 'windows-nt) + (alert-define-style + 'windows-desktop-notification-style + :title "Windows Desktop Notification style" + :notifier + (lambda (info) + (let ((notif-id (w32-notification-notify :title (plist-get info :title) :body (plist-get info :message)))) + ;; Close it after 3 seconds (no new notification can be sent if left unclosed) + (run-with-timer 3 nil `(lambda() (w32-notification-close ,notif-id)))))) + (setq alert-default-style 'windows-desktop-notification-style))) +#+end_src ** Treemacs #+begin_src emacs-lisp (use-package treemacs