Sha256: 6e87bc0b159f0ef5435570b76af82ae2ccb4d4da8b9cfd7b6a7154b2bcda8359

Contents?: true

Size: 333 Bytes

Versions: 4

Compression:

Stored size: 333 Bytes

Contents

module Notifier
  module Knotify
    extend self

    def supported?
      RUBY_PLATFORM =~ /(linux|freebsd)/ && `ps -Al | grep dcop` && $? == 0
    end

    def notify(options)
      Thread.new do
        `dcop knotify default notify eventname \'#{options[:title]}\' \'#{options[:message]}\' '' '' 16 2`
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
notifier-0.1.3 lib/notifier/knotify.rb
notifier-0.1.2 lib/notifier/knotify.rb
notifier-0.1.1 lib/notifier/knotify.rb
notifier-0.1.0 lib/notifier/knotify.rb