gen2brain / beeep

Go cross-platform library for sending desktop notifications, alerts and beeps
BSD 2-Clause "Simplified" License
1.43k stars 89 forks source link

Blink icon app notification #32

Open dhinojosac opened 4 years ago

dhinojosac commented 4 years ago

It would be a good feature if this could have blinking alerts on the application icon.

gen2brain commented 4 years ago

Not sure what you mean, app icon in the notification or something else? Is that part of some spec?

dhinojosac commented 4 years ago

I mean, the application icon in the taskbar (windows) could it blinks or change color. image

gen2brain commented 4 years ago

I see, will need to check. If possible on all platforms (and without CGO) it does seem like a nice addition.

gen2brain commented 4 years ago

On X11, WM urgency hint can be set https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#URGENCY, it should be possible with https://github.com/BurntSushi/xgb or xgbutil.

On Windows, there is FlashWindow function, https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-flashwindow, also, https://stackoverflow.com/questions/2620409/getting-hwnd-of-current-process.

On Web, javascript can just toggle document title on/off. Not sure what can be done on macOS.