Skip to content

Instantly share code, notes, and snippets.

@takapiko
Created March 3, 2014 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takapiko/9320679 to your computer and use it in GitHub Desktop.
Save takapiko/9320679 to your computer and use it in GitHub Desktop.
message_box内の内容をgoogleで検索するmikutterプラグイン
# -*- coding: utf-8 -*-
Plugin.create :message_box_google do
command(:message_box_google,
name: 'メッセージボックスの内容をぐぐる',
condition: lambda{ |opt| true },
visible: true,
role: :postbox)do |opt|
baseurl = 'https://www.google.co.jp/#q='
str = Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text
Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text = ""
Gtk::openurl (baseurl + str)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment