• Stars
    star
    26
  • Rank 900,820 (Top 19 %)
  • Language
    Crystal
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Libnotify for Crystal

Libnotify for Crystal

Build Status Shard version

Bindings for GNOME's Libnotify.

For the Ruby version see https://rubygems.org/gems/libnotify.

libnotify

Installation

Add this to your application's shard.yml:

dependencies:
  libnotify:
    github: splattael/libnotify.cr
    version: ~> 0.4.0

Linux

apt-get install libnotify # debian
pacman -S libnotify       # archlinux
dnf install libnotify     # fedora

Usage

require "libnotify"

n = Libnotify.show do |notify|
  notify.summary    = "hello"
  notify.body       = "world"
  notify.timeout    = 1.5
  notify.timeout    = 1500
  notify.urgency    = :critical   # :low, :normal, :critical
  notify.append     = false       # default true
  notify.transient  = true        # default false
  notify.icon_path  = "/usr/share/icons/gnome/scalable/emblems/emblem-default.svg"
end

n = Libnotify.new(summary: "big", body: "body text").show
sleep 1
n.body = "hello world"
n.update.show

Development

$ make update
$ make spec

Linux

apt-get install libnotify-dev # debian
pacman -S libnotify           # archlinux
dnf install libnotify         # fedora

Generate libnotify/c.cr

$ git clone https://github.com/crystal-lang/crystal_lib
$ cd crystal_lib
$ apt install libclang-dev
$ shards install && make
$ ./main < ../libnotify.cr/crystal_lib/libnotify.cr  > ../libnotify.cr/src/libnotify/c.cr

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Release

  • Make sure make spec is green
  • Commit all changes
  • Bump version in src/libnotify/version.cr
  • Adjust version in README.md and shard.yml
  • make release

Contributors

  • splattael Peter Leitzen - creator, maintainer
  • Nephos Arthur Poulet - contributor
  • brodi1 Brodi - contributor

More Repositories

1

libnotify

Ruby bindings for libnotify using FFI.
Ruby
135
star
2

hashids.cr

A Crystal shard to generate YouTube-like hashes from one or many numbers. Use hashids when you do not want to expose your database ids to the user.
Crystal
52
star
3

minitest-around

Around block for minitest.
Gherkin
41
star
4

hotch

Profile helper
Ruby
28
star
5

dind-example

Docker in docker example
9
star
6

docker-phpmyadmin

Dockerized phpMyAdmin on Alpine
PHP
7
star
7

bigbrother

Server overseer.
Crystal
6
star
8

dotfiles

Personal dotfiles
Python
6
star
9

chrome-feedly-tabs

Open Feedly articles in new tabs.
JavaScript
6
star
10

erl_nif.cr

WIP: Erlang NIF in Crystal
Crystal
6
star
11

ruml

Ruby mailing list software
Ruby
5
star
12

phpmyadmin-backup

Backup DB from phpmyadmin via mechanize
Ruby
5
star
13

crystal-ctags

Support for the Crystal language in ctags
4
star
14

shoutcast_api

Simple API for shoutcast.com
Ruby
4
star
15

ruby-live-for-speed

A Ruby parser for racing game Live for Speed
Ruby
3
star
16

minitest-libnotify

Test notifier for minitest via libnotify.
Ruby
3
star
17

structr

Structure plain text with regexp.
Ruby
2
star
18

firefox-feedly-tabs

Open Feedly articles in new tabs. For Firefox.
JavaScript
2
star
19

docker-firefox

Dockerized Firefox
Makefile
2
star
20

services

Ruby
2
star
21

leetplate

Number plate generator (with l337 support)
JavaScript
2
star
22

valuedate

Validates a schema
Ruby
2
star
23

elm-connect-four

Connect four in elm
Elm
1
star
24

riot_notifier

Notifier for testing framework riot.
Ruby
1
star
25

rouge-lexers-crystal

[DEPRECATED] Rouge's lexer for crystal
Ruby
1
star
26

smstrade_de

Gem for sending SMS via smstrade.de Gateway.
Ruby
1
star
27

dns_checker

Compares domains with root nameserver and your nameserver.
Ruby
1
star
28

optcarrot.cr

Ruby
1
star
29

sloono

Simple SMS API for sloono.de
Ruby
1
star
30

meta_code_commenter

Comments your meta code.
Ruby
1
star