Created
November 14, 2013 16:36
-
-
Save adkron/7469930 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Notify | |
| include Weechat | |
| def notify_msg( data, buffer, date, tags, visible, highlight, prefix, message ) | |
| if highlight.to_i != 0 | |
| TerminalNotifier.execute(verbose = false, message: message) | |
| end | |
| return WEECHAT_RC_OK | |
| end | |
| def notify_msg( data, buffer, date, tags, visible, highlight, prefix, message ) | |
| end | |
| end | |
| def weechat_init | |
| require "terminal-notifier" | |
| Weechat::register *["notify", "Amos King", "0.1", "MIT", "Notify OSX Message Center", "", ""] | |
| Weechat.hook_print( '', '', '', 1, 'notify_msg', '' ) | |
| TerminalNotifier.execute(verbose = false, message: "Loaded Weechat Notify") | |
| return Weechat::WEECHAT_RC_OK | |
| end | |
| def notify_msg(*args) | |
| Notify.new.notify_msg *args | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment