Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cout opened this issue Jan 8, 2018 · 1 comment

Comments

@cout
Copy link

cout commented Jan 8, 2018

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]
@rymai
Copy link
Member

rymai commented Jan 9, 2018

I think you're right and the README should be fixed, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants