Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby bindings for libnotify using FFI.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.rdoc
Rakefile
VERSION
libnotify.gemspec
test.watchr

README.rdoc

Libnotify

Ruby bindings for libnotify using FFI.

Source | RDoc

Usage

require 'libnotify'

# Block syntax
n = 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.append = false       # default true - append onto existing notification
  notify.icon_path = "/usr/share/icons/gnome/scalable/emblems/emblem-default.svg"
end
n.show!

# 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'll need libnotify. On Debian just type:

apt-get install libnotify1

Testing

git co git://github.com/splattael/libnotify.git
cd libnotify
gem install bundler
bundle install
rake

Authors

TODO

  • Mock FFI calls with rrriot. (test/test_libnotify.rb:61)

Something went wrong with that request. Please try again.