Skip to content

Commit

Permalink
Add support for subtitle and sound in terminal-notifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknomitch authored and fnando committed Apr 7, 2016
1 parent 22c9f97 commit 11caa06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/notifier/terminal_notifier.rb
Expand Up @@ -12,9 +12,14 @@ def notify(options)
"-group", "notifier-rubygems",
"-title", options[:title].to_s,
"-appIcon", options.fetch(:image, "").to_s,
"-message", options[:message].to_s
"-message", options[:message].to_s,
"-subtitle", options.fetch(:subtitle, "").to_s
]

# -sound with an empty string (e.g., "") will trigger the
# default sound so we need to check for it.
command.concat(["-sound", options.fetch(:sound, "default").to_s] ) if options[:sound]

Thread.new { system(*command) }.join
end
end
Expand Down

0 comments on commit 11caa06

Please sign in to comment.