lib/notifier/kdialog.rb in notifier-0.1.1 vs lib/notifier/kdialog.rb in notifier-0.1.2
- old
+ new
@@ -5,11 +5,15 @@
def supported?
RUBY_PLATFORM =~ /(linux|freebsd)/ && `which kdialog > /dev/null` && $? == 0
end
def notify(options)
- Thread.new do
- `kdialog --title #{options[:title]} --passivepopup \"#{options[:message]}\" 5`
- end
+ command = %W[
+ kdialog
+ --title='#{options[:title]}'
+ --passivepopup='#{options[:message]}' 5
+ ].join(" ")
+
+ Thread.new { `#{command}` }
end
end
end