Skip to content

Commit

Permalink
added julia icon for windows notification, fixed linux errors
Browse files Browse the repository at this point in the history
  • Loading branch information
haberdashPI committed May 28, 2020
1 parent 8450d3d commit 2c28f40
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,29 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Logo designs in this repository are

- **Copyright (c) 2012-2019:** Stefan Karpinski \<[email protected]\>.

These designs are licensed under the Creative Commons
["BY-NC-SA" 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) License.
This means that you are free to:

- **Share** — copy and redistribute the material in any medium or format
- **Adapt** — remix, transform, and build upon the material

The licensor cannot revoke these freedoms as long as you follow the license terms:

- **Attribution** — You must give appropriate credit, provide a link to the license,
and indicate if changes were made. You may do so in any reasonable manner, but not
in any way that suggests the licensor endorses you or your use.
- **NonCommercial** — You may not use the material for commercial purposes.
- **ShareAlike** — If you remix, transform, or build upon the material, you must
distribute your contributions under the same license as the original.
- **No additional restrictions** — You may not apply legal terms or technological
measures that legally restrict others from doing anything the license permits.

If you wish to use the Julia logo as is or derive another logo from it for commercial
purposes, you must conact the licensor, [Stefan Karpinski]([email protected]), for
permission to do so as such usage is not covered under this license.
Binary file added images/julia.ico
Binary file not shown.
11 changes: 6 additions & 5 deletions src/Alert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,22 @@ function alert(message="Done!")
@static if Sys.isapple()
run(`osascript -e 'display notification "'$message'" with title "Julia"'`)
elseif Sys.islinux()
if !isempty(Sys.which("notify-send"))
if !isnothing(Sys.which("notify-send"))
run(`notify-send $message`)
elseif !isempty(Sys.which("zenity"))
elseif !isnothing(Sys.which("zenity"))
run(pipeline(`echo $message`,`zenity --notification --listen`))
elseif !isempty(Sys.which("kdialog"))
elseif !isnothing(Sys.which("kdialog"))
run(`kdialog --title "Julia" --passivepopup $message 10`,wait=false)
elseif !isempty(Sys.which("xmessage"))
elseif !isnothing(Sys.which("xmessage"))
run(`xmessage $message`)
else
@info "Trying to send message: $message."
@error("No program for displaying notifications available, install",
" 'notify-send', 'zenity', 'kdialog' or 'xmessage'.")
end
elseif Sys.iswindows()
wintoast.ToastNotifier().show_toast("Julia",message)
wintoast.ToastNotifier().show_toast("Julia",message,
icon_path=joinpath(@__DIR__,"..","images","julia.ico"))
else
@info "Trying to send message: $message."
@error "Unsupported operating system."
Expand Down

2 comments on commit 2c28f40

@haberdashPI
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/15535

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 2c28f40d3e0bf239afb9736d3d239bd48cbf104b
git push origin v0.1.0

Please sign in to comment.