Ruby bindings for libnotify using FFI.
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 239 commits behind splattael:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.watchr
README.rdoc
Rakefile
VERSION

README.rdoc

Libnotify

Ruby binding for libnotify using FFI.

Usage

require 'libnotify'

# Block syntax
Libnotify.new do |notify|
  notify.summary = "world"
  notify.body = "hello"
  notify.timeout = 1.5        # 1.5 (s), 1000 (ms), "2", nil, false
  notify.urgency = :critical  # :low, :normal, :critical
  notify.icon_path = "/usr/share/icons/gnome/scalable/emblems/emblem-default.svg"
  notify.show!
end

# Hash syntax
Libnotify.show(:body => "hello", :summary => "world", :timeout => 2.5)

# Mixed syntax
Libnotify.show(options) do |n|
  n.timeout = 1.5     # overrides :timeout in options
end

Installation

gem install libnotify

You need libnotify. On Debian you can just do:

apt-get install libnotify1

Authors

  • Peter Suschlik

TODO

  • Mock FFI calls