glzr-io/glazewm

custom notifications aren't shown

dinesh-58 opened this issue · 1 comments

In Emacs, I'm using the below bit of code to get notifications for my agenda tasks. Notifications don't show when glaze is running. Might be something to do with how Emacs' w32-notification-notify function works.

(setq
 '(org-wild-notifier-alert-time '(10 3))
 '(org-wild-notifier-mode t)
)
(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 5 seconds (no new notification can be sent if left unclosed)
         (run-with-timer 5 nil `(lambda() (w32-notification-close ,notif-id))))))
    (setq alert-default-style 'windows-desktop-notification-style)))

I also found this powershell snippet online to test notifications and that too doesn't work when glaze is running. To test this, you'll need to save a valid icoOnline.ico file in your home directory and configure Set-ExecutionPolicy.

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon 

$objNotifyIcon.Icon = "icoOnline.ico"
$objNotifyIcon.BalloonTipIcon = "None" 
$objNotifyIcon.BalloonTipText = "wzzup this is a title." 
$objNotifyIcon.BalloonTipTitle = "WHATS UPPP THIS IS A PARAGRAPH!"

$objNotifyIcon.Visible = $True 
$objNotifyIcon.ShowBalloonTip(10000)

This online notifications test works though. I don't think this bug is too important to fix.

Note: these notifications don't even show up in the notifications tray so glaze might be affecting how notifications are handled