File: alsa.rb

package info (click to toggle)
mikutter 5.0.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,700 kB
  • sloc: ruby: 21,307; sh: 181; makefile: 19
file content (11 lines) | stat: -rw-r--r-- 259 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
# -*- coding: utf-8 -*-
# aplayコマンドで音を鳴らす

Plugin.create :alsa do

  aplay_exist = command_exist?('aplay')

  defsound :alsa, "ALSA" do |filename|
    bg_system("aplay","-q", filename) if FileTest.exist?(filename) and aplay_exist end

end