File: kdialog.rb

package info (click to toggle)
ruby-notify 0.5.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 144 kB
  • sloc: ruby: 112; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
module Notify
  if which('kdialog')
    def self.notify(title, message, option = {})
      iconargs = option.key?(:icon) ? ["--icon", option[:icon]] : ["",""]
      system 'kdialog', '--passivepopup', message, '--title',title, iconargs[0], iconargs[1]
    end
  end
end