Sha256: 9fedff77ce3eeba6823b006cd974e28d3a3b2a05239c3d043236260530046eed
Contents?: true
Size: 450 Bytes
Versions: 4
Compression:
Stored size: 450 Bytes
Contents
# frozen_string_literal: true module Notifier module Kdialog extend self def supported? Notifier.os?(/(linux|freebsd)/) && `which kdialog > /dev/null` && $CHILD_STATUS == 0 end def notify(options) command = [ "kdialog", "--title", options[:title].to_s, "--passivepopup", options[:message].to_s, "5" ] Thread.new { system(*command) }.join end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
notifier-1.2.2 | lib/notifier/kdialog.rb |
notifier-1.2.1 | lib/notifier/kdialog.rb |
notifier-1.1.0 | lib/notifier/kdialog.rb |
notifier-1.0.0 | lib/notifier/kdialog.rb |