#!/usr/bin/env ruby require 'socket' require 'uri' require 'open-uri' require 'optparse' require 'optparse/uri' KDWATCH_VERSION=Gem.loaded_specs["kdwatch"].version rescue "unknown-version" loport = 7991 hiport = 7999 match = nil uri = URI.parse("http://127.0.0.1") op = OptionParser.new do |opts| opts.banner = </, "") scl.chomp!('<') puts "#{url} #{scl}" if match && scl.downcase.include?(match.downcase) spawn("open #{url} || xdg-open #{url} || echo @@@ Please open #{url}") end break end end rescue nil end