Help us understand the problem. What is going on with this article?

Ubuntu+WeechatでもIRCで呼ばれたら通知したい!

More than 5 years have passed since last update.

MacだとGrowl使えたけどUbuntuで似たことやるにはどうすんだろと思って調べた.

notify-send というのがある. これを使えば任意のテキストをGrowlっぽく通知させることができる.

$ gem install weechat

以下のような内容を ~/wee.rb として保存.

~/wee.rb
# coding: utf-8
require 'rubygems'
require 'weechat'

def weechat_init
  Weechat.register("send-notify", "memerelics", "0.1", "GPL3",
                   "Notify message with using notify-send.", "", "")
  run_hook_signal
  return Weechat::WEECHAT_RC_OK
end

def run_hook_signal
  Weechat.hook_signal("weechat_highlight", "notify_highlight", "")
end

def notify_highlight(data, signal, message)
  notify message
end

def notify message
  system("/usr/bin/notify-send", message)
end

weechatコマンドで以下のようにこのスクリプトをload.

/ruby load ~/wee.rb

これであとは自分の名前が出たらポップアップが出てきます.

あずにゃんに怒ってもらうことができました.

hash
機能が向上し, 問題が修正されています
http://twitter.com/T_Hash
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away