Sha256: 29d43bd2aed27c9d3b1ac0312b4c166810b74049209ddb6b429038f43d1e99bc

Contents?: true

Size: 389 Bytes

Versions: 4

Compression:

Stored size: 389 Bytes

Contents

module Notifier
  module Knotify
    extend self

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

    def notify(options)
      command = [
        "dcop", "knotify", "default", "notify", "eventname",
        options[:title], options[:message],
        "", "", "16", "2"
      ]

      Thread.new { system(*command) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
notifier-0.5.0 lib/notifier/knotify.rb
notifier-0.4.1 lib/notifier/knotify.rb
notifier-0.4.0 lib/notifier/knotify.rb
notifier-0.2.1 lib/notifier/knotify.rb