class Notiffany::Notifier::TerminalTitle
Shows system notifications in the terminal title bar.
def _check_available(_options)
def _check_available(_options) end
def _gem_name
def _gem_name nil end
def _perform_notify(message, opts = {})
(**opts)
-
title
(String
) -- the notification title -
type
(String
) -- the notification type. Either 'success', -
message
(String
) -- the notification message body
Parameters:
-
opts
(Hash
) -- additional notification library options
def _perform_notify(message, opts = {}) first_line = message.sub(/^\n/, "").sub(/\n.*/m, "") STDOUT.puts "\e]2;[#{opts[:title]}] #{first_line}\a" end
def turn_off
def turn_off STDOUT.puts "\e]2;\a" end