Skip to content

Instantly share code, notes, and snippets.

@tumugin
Created March 5, 2014 19:12
Show Gist options
  • Save tumugin/9374346 to your computer and use it in GitHub Desktop.
Save tumugin/9374346 to your computer and use it in GitHub Desktop.
mikutter-nowplaying
# -*- coding: utf-8 -*-
require 'kconv'
Plugin.create(:nowplaying) do
command(:nowplaying,
name: "なうぷれTunes",
condition: lambda{ |opt| true },
visible: true,
role: :postbox
) do |opt|
begin
SEPARATOR = File::ALT_SEPARATOR || File::SEPARATOR
path = File.expand_path(File.dirname(__FILE__)) + SEPARATOR + "PluginReceiver.exe"
np = `#{path} mikutter`
Plugin[:gtk].widgetof(opt.widget).widget_post.buffer.text = NKF.nkf('-wxm0', np)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment