File: libnotify.rb

package info (click to toggle)
mikutter 3.0.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,396 kB
  • ctags: 1,916
  • sloc: ruby: 16,619; sh: 117; makefile: 27
file content (10 lines) | stat: -rw-r--r-- 510 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
# -*- coding: utf-8 -*-
# notify-sendコマンド又はruby-libnotifyで通知を表示する。

if require_if_exist('RNotify') and defined?(Notify) and Notify.init("mikutter") # ruby-libnotifyがつかえる場合
  notice 'notify: use rnotify'
  require File.expand_path File.join(File.dirname(__FILE__), 'rnotify')
elsif command_exist? 'notify-send' # notify-sendコマンドが有る場合
  notice 'notify: use notify-send'
  require File.expand_path File.join(File.dirname(__FILE__), 'notify-send')
end