Sha256: ae5cf7821473a29b4f28299e213c89b34a96f4dab5e5a2ad212ade0cc8d588fd

Contents?: true

Size: 377 Bytes

Versions: 2

Compression:

Stored size: 377 Bytes

Contents

module Notifier
  module Kdialog
    extend self

    def supported?
      RUBY_PLATFORM =~ /(linux|freebsd)/ && `which kdialog > /dev/null` && $? == 0
    end

    def notify(options)
      command = %W[
        kdialog
        --title='#{options[:title]}'
        --passivepopup='#{options[:message]}' 5
      ].join(" ")

      Thread.new { `#{command}` }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
notifier-0.1.3 lib/notifier/kdialog.rb
notifier-0.1.2 lib/notifier/kdialog.rb