# \[ANN\] Alert.jl - Simple desktop notifications

**URL:** <https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360>\
**Category:** Package Announcements\
**Created:** [May 28, 2020, 5:44pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360 "2020-05-28T17:44:29Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [May 28, 2020, 5:44pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/1 "2020-05-28T17:44:29Z")

</div>

Hi all,

I created a very small, simple package ([Alert](https://github.com/haberdashPI/Alert.jl)) for getting a desktop notification (a.k.a. “toast”) across platforms. Like so:

```julia
using Alert

for i in 1:10_000
    long_running_function()
end

alert("Your julia script is finished!")

```

I find it helpful when I’m running something time consuming and want to know when it’s finished while doing other work.

I’ve tested it on MacOS and Windows 10, but I don’t have a linux system handy, so if someone could try it out and confirm that it pops up a notification of some sort, that would be really helpful.

Hope it’s useful to folks!

---

<div class="post-metadata">

**Author:** ![dunefox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dunefox/32/12149_2.png) [@dunefox](https://discourse.julialang.org/u/dunefox)\
**Post date:** [May 28, 2020, 6:07pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/2 "2020-05-28T18:07:10Z")

</div>

On Linux:

> (@v1.4) pkg\> add Alert  
> Updating registry at `~/.julia/registries/General`  
> Updating git-repo `https://github.com/JuliaRegistries/General.git`  
> ERROR: The following package names could not be resolved:
> 
> - Alert (not found in project, manifest or registry)

When cloned and ran I get the following:

```julia

julia> include("src/Alert.jl")
Main.Alert

julia> Alert.alert("as")
Process(`notify-send as`, ProcessExited(0))

```

and Ubuntu displays a notification at the top (as I just noticed). Seems to work as intended.

---

<div class="post-metadata">

**Author:** ![kevinczimmerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevinczimmerman/32/13040_2.png) [@kevinczimmerman](https://discourse.julialang.org/u/kevinczimmerman)\
**Post date:** [May 28, 2020, 6:10pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/3 "2020-05-28T18:10:19Z")

</div>

```julia
pkg> add https://github.com/haberdashPI/Alert.jl

```

---

<div class="post-metadata">

**Author:** ![dunefox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dunefox/32/12149_2.png) [@dunefox](https://discourse.julialang.org/u/dunefox)\
**Post date:** [May 28, 2020, 6:13pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/4 "2020-05-28T18:13:34Z")

</div>

Right, I didn’t think of that, thanks.

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [May 28, 2020, 6:15pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/5 "2020-05-28T18:15:37Z")

</div>

Great idea!!!

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [May 30, 2020, 7:11am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/6 "2020-05-30T07:11:07Z")

</div>

Lovely package! Works perfectly on my MacOS machine.

cc @yakir12 - this was something you were looking for earlier, I think…

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 30, 2020, 5:37pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/7 "2020-05-30T17:37:03Z")

</div>

Thanks! Right you are !

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [May 30, 2020, 6:53pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/8 "2020-05-30T18:53:00Z")

</div>

Thanks! Will you register it?

---

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [May 30, 2020, 7:33pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/9 "2020-05-30T19:33:51Z")

</div>

Already, registered! Just waiting for the auto megre delay (3 days).

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [August 20, 2020, 2:07am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/10 "2020-08-20T02:07:35Z")

</div>

Doesn’t work from within VSCode on Windows.

---

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [August 20, 2020, 4:15am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/11 "2020-08-20T04:15:11Z")

</div>

Hi @xiadoai; can you give me some more details? I am not having any problem running it on Windows 10 on my machine. Do you get any error message? Your windows version? (I am also running it from within VSCode; that shouldn’t matter though).

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [August 20, 2020, 4:23am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/12 "2020-08-20T04:23:58Z")

</div>

I just get this in the REPL but no notification

```julia
Process(`powershell.exe -Enc JABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAdABvAHAAIgAKAAoAJABuAG8AdABpAGYAaQBjAGEAdABpAG8AbgBUAGkAdABsAGUAIAA9ACAAIgBZAG8AdQByACAAagB1AGwAaQBhACAAcwBjAHIAaQBwAHQAIABpAHMAIABmAGkAbgBpAHMAaABlAGQAIQAiAAoACgBbAFcAaQBuAGQAbwB3AHMALgBVAEkALgBOAG8AdABpAGYAaQBjAGEAdABpAG8AbgBzAC4AVABvAGEAcwB0AE4AbwB0AGkAZgBpAGMAYQB0AGkAbwBuAE0AYQBuAGEAZwBlAHIALAAgAFcAaQBuAGQAbwB3AHMALgBVAEkALgBOAG8AdABpAGYAaQBjAGEAdABpAG8AbgBzACwAIABDAG8AbgB0AGUAbgB0AFQAeQBwAGUAIAA9ACAAVwBpAG4AZABvAHcAcwBSAHUAbgB0AGkAbQBlAF0AIAA+ACAAJABuAHUAbABsAAoAJAB0AGUAbQBwAGwAYQB0AGUAIAA9ACAAWwBXAGkAbgBkAG8AdwBzAC4AVQBJAC4ATgBvAHQAaQBmAGkAYwBhAHQAaQBvAG4AcwAuAFQAbwBhAHMAdABOAG8AdABpAGYAaQBjAGEAdABpAG8AbgBNAGEAbgBhAGcAZQByAF0AOgA6AEcAZQB0AFQAZQBtAHAAbABhAHQAZQBDAG8AbgB0AGUAbgB0ACgAWwBXAGkAbgBkAG8AdwBzAC4AVQBJAC4ATgBvAHQAaQBmAGkAYwBhAHQAaQBvAG4AcwAuAFQAbwBhAHMAdABUAGUAbQBwAGwAYQB0AGUAVAB5AHAAZQBdADoAOgBUAG8AYQBzAHQAVABlAHgAdAAwADEAKQAKAAoAIwBDAG8AbgB2AGUA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AGUAbABsACIACgAkAHQAbwBhAHMAdAAuAEUAeABwAGkAcgBhAHQAaQBvAG4AVABpAG0AZQAgAD0AIABbAEQAYQB0AGUAVABpAG0AZQBPAGYAZgBzAGUAdABdADoAOgBOAG8AdwAuAEEAZABkAE0AaQBuAHUAdABlAHMAKAA1ACkACgAjACQAdABvAGEAcwB0AC4AUwB1AHAAcAByAGUAcwBzAFAAbwBwAHUAcAAgAD0AIAAkAHQAcgB1AGUACgAKACQAbgBvAHQAaQBmAGkAZQByACAAPQAgAFsAVwBpAG4AZABvAHcAcwAuAFUASQAuAE4AbwB0AGkAZgBpAGMAYQB0AGkAbwBuAHMALgBUAG8AYQBzAHQATgBvAHQAaQBmAGkAYwBhAHQAaQBvAG4ATQBhAG4AYQBnAGUAcgBdADoAOgBDAHIAZQBhAHQAZQBUAG8AYQBzAHQATgBvAHQAaQBmAGkAZQByACgAIgBQAG8AdwBlAHIAUwBoAGUAbABsACIAKQAKACQAbgBvAHQAaQBmAGkAZQByAC4AUwBoAG8AdwAoACQAdABvAGEAcwB0ACkAOwAKAA==`, ProcessExited(0))

```

---

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [August 20, 2020, 11:13am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/13 "2020-08-20T11:13:57Z")

</div>

Does Julia hang or does the command complete? What version of windows?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [August 20, 2020, 11:20am UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/14 "2020-08-20T11:20:05Z")

</div>

Finished. Wondows 10 pro

---

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [August 20, 2020, 1:10pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/15 "2020-08-20T13:10:35Z")

</div>

Do you have notifications turned on? I just saw that the Julia command returns with `ProcessExited(0)` in the output you posted. That means that there was no error in running the power shell script (so as far as Julia can tell the command worked). Under the OS settings you should see something like the following:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/5/b55776f64fa7dae966a3773bca40e3627a1a480b.png)

That’s the only explanation I can currently think of for why you aren’t seeing anything. If that isn’t the problem, if you could give me some more details about exactly what you’re doing that would be really helpful.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [August 20, 2020, 1:16pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/16 "2020-08-20T13:16:54Z")

</div>

you are right. i have it turned off 🤕

---

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [August 20, 2020, 2:22pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/17 "2020-08-20T14:22:27Z")

</div>

![alert](https://global.discourse-cdn.com/julialang/original/3X/3/0/30c4244fbed3a2a729fa559de8a869c6f9eaaf35.png) 🥳

---

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [August 31, 2020, 4:00pm UTC](https://discourse.julialang.org/t/ann-alert-jl-simple-desktop-notifications/40360/18 "2020-08-31T16:00:58Z")

</div>

For those interested, I have now also created a small extension to Alert called [AlertPushover](https://github.com/haberdashPI/AlertPushover.jl): it allows you to get notifications on your phone or browser from a remote Julia session.
