Closed afbjorklund closed 1 year ago
There is some debugging log spam when invoked, but I kept it the same as the Mac version for now...
log.Printf("notify-send %#v", args)
log.Printf("terminal-notifier %#v", args)
I don't think it needs to log this (definitely not to stderr), but if it does it should have a "debug" log level.
In theory this should also work on Windows, with notify-send
: http://vaskovsky.net/notify-send/
@@ -39,12 +39,12 @@
}
args := []string{
- "--icon", icon,
+ "-i", icon,
title,
subtitle,
}
log.Printf("notify-send %#v", args)
- err := exec.Command("notify-send", args...).Run()
+ err := exec.Command("notify-send.exe", args...).Run()
if err != nil {
log.Fatalf("Failed to exec: %v", err)
}
It might need some patches to allow additional icons https://github.com/vaskovsky/notify-send
EDIT: apparently you can't use custom icons with the default API, so not possible (this way at least)
It could probably be done using a different API call, with a modification to the external C# program
Tested with GOOS=windows
and Wine + Mono:
Using
notify-send
instead ofterminal-notifier
, and icons instead of emojis.Renamed the "notify-macos" to the proper "notify_darwin", so the build works.
Sample notification:
Issue #116