#!/usr/bin/env ruby require 'rubygems' require "wx" class MinimalApp < Wx::App def initialize(time) @time = time super() end def on_init Wx::Timer.every(@time*60*1000) do @frame.set_background_colour Wx::GREEN end size = Wx::get_display_size size.set_height(size.get_height - 45) title = Time.now.strftime("%H:%M:%S") title += ' - ' title += (Time.now + @time*60).strftime("%H:%M:%S") title += ' (' title += @time.to_s title += ' minutes)' @frame = Wx::Frame.new(nil, -1, title, Wx::Point.new(0, 0), size) @frame.set_background_colour Wx::BLACK @frame.show end end MinimalApp.new((ARGV.first || 3).to_i).main_loop