Skip to content

Title passed into Notiffany.connect is not used by terminal title notifier #32

@cout

Description

@cout

README.md says to do this:

notifier = Notiffany.connect(title: "A message")
notifier.notify("Hello there!", image: :success)

but when I do this, the title in my terminal window is set to "[Notiffany] Hello there!".

If I read the code correctly, only four options can be passed into Notifier.connect (namespace, logger, notify, and notifiers); other options are not passed to the notifier constructors, which means they always get the default title ("Notiffany"):

2.1.7 :026 > notifier.available
 => [#<Notiffany::Notifier::Tmux:0x00000002552a38 @options={:title=>"Notiffany", :tmux_environment=>"TMUX", :success=>"green", :failed=>"red", :pending=>"yellow", :default=>"green", :timeout=>5, :display_message=>false, :default_message_format=>"%s - %s", :default_message_color=>"white", :display_on_all_clients=>false, :display_title=>false, :default_title_format=>"%s - %s", :line_separator=>" - ", :change_color=>true, :color_location=>"status-left-bg"}, @images_path=#<Pathname:/home/pbrannan/.rvm/gems/ruby-2.1.7/gems/notiffany-0.1.1/images>, @session=nil>, #<Notiffany::Notifier::TerminalTitle:0x00000002550c10 @options={:title=>"Notiffany"}, @images_path=#<Pathname:/home/pbrannan/.rvm/gems/ruby-2.1.7/gems/notiffany-0.1.1/images>>]
2.1.7 :027 > notifier.available.first.options[:title]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions