Skip to content

Instantly share code, notes, and snippets.

@katsyoshi
Created November 2, 2013 10:54
Show Gist options
  • Save katsyoshi/7277744 to your computer and use it in GitHub Desktop.
Save katsyoshi/7277744 to your computer and use it in GitHub Desktop.
macでmikutterの音を鳴らすプラグイン
Module.new do
if command_exist? "afplay"
Plugin::create(:mac_sound).add_event(:play_sound){ |filename, &stop|
SerialThread.new {
bg_system("afplay", filename) if FileTest.exist?(filename) }
stop.call
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment