update linky-notifier

This commit is contained in:
Sami Samhuri 2017-03-03 22:25:05 -08:00
parent d41caafce9
commit 53f3a62d38
No known key found for this signature in database
GPG key ID: F76F41F04D99808F

View file

@ -9,7 +9,7 @@ DEBUG = false
def log_file
@log_file ||= begin
at_exit { log_file.close }
File.open('/Users/sjs/linky-notify.log', 'a')
File.open(File.expand_path('~/linky-notify.log'), 'a')
end
end
@ -39,7 +39,8 @@ def e(s)
end
def notify_command(title, url)
"/Users/sjs/.rbenv/shims/terminal-notifier -title #{e(title)} -message #{e(url)} -open #{e(url)} -sender com.apple.Terminal 2>&1"
notifier = File.expand_path '~/.rbenv/shims/terminal-notifier'
"#{notifier} -title #{e(title)} -message #{e(url)} -open #{e(url)} -actions 'Open' -closeLabel Ignore 2>&1"
end
def main